KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > ecore > sdo > provider > EChangeSummarySettingItemProvider


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2003-2004 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: EChangeSummarySettingItemProvider.java,v 1.7 2005/06/08 06:17:15 nickb Exp $
16  */

17 package org.eclipse.emf.ecore.sdo.provider;
18
19
20 import java.util.List JavaDoc;
21
22 import org.eclipse.emf.common.notify.AdapterFactory;
23 import org.eclipse.emf.common.notify.Notification;
24 import org.eclipse.emf.common.util.ResourceLocator;
25 import org.eclipse.emf.ecore.change.provider.FeatureChangeItemProvider;
26 import org.eclipse.emf.ecore.sdo.EChangeSummarySetting;
27 import org.eclipse.emf.ecore.sdo.SDOPackage;
28 import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
29 import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
30 import org.eclipse.emf.edit.provider.IItemLabelProvider;
31 import org.eclipse.emf.edit.provider.IItemPropertySource;
32 import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
33 import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
34
35
36 /**
37  * This is the item provider adapter for a {@link org.eclipse.emf.ecore.sdo.EChangeSummarySetting} object.
38  * <!-- begin-user-doc -->
39  * <!-- end-user-doc -->
40  * @generated
41  */

42 public class EChangeSummarySettingItemProvider
43   extends FeatureChangeItemProvider
44   implements
45     IEditingDomainItemProvider,
46     IStructuredItemContentProvider,
47     ITreeItemContentProvider,
48     IItemLabelProvider,
49     IItemPropertySource
50 {
51   /**
52    * This constructs an instance from a factory and a notifier.
53    * <!-- begin-user-doc -->
54    * <!-- end-user-doc -->
55    * @generated
56    */

57   public EChangeSummarySettingItemProvider(AdapterFactory adapterFactory)
58   {
59     super(adapterFactory);
60   }
61
62   /**
63    * This returns the property descriptors for the adapted class.
64    * <!-- begin-user-doc -->
65    * <!-- end-user-doc -->
66    * @generated
67    */

68   public List JavaDoc getPropertyDescriptors(Object JavaDoc object)
69   {
70     if (itemPropertyDescriptors == null)
71     {
72       super.getPropertyDescriptors(object);
73
74       addPropertyPropertyDescriptor(object);
75     }
76     return itemPropertyDescriptors;
77   }
78
79   /**
80    * This adds a property descriptor for the Property feature.
81    * <!-- begin-user-doc -->
82    * <!-- end-user-doc -->
83    * @generated
84    */

85   protected void addPropertyPropertyDescriptor(Object JavaDoc object)
86   {
87     itemPropertyDescriptors.add
88       (createItemPropertyDescriptor
89         (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
90          getResourceLocator(),
91          getString("_UI_ChangeSummarySetting_property_feature"),
92          getString("_UI_PropertyDescriptor_description", "_UI_ChangeSummarySetting_property_feature", "_UI_ChangeSummarySetting_type"),
93          SDOPackage.eINSTANCE.getChangeSummarySetting_Property(),
94          false,
95          null,
96          null,
97          null));
98   }
99
100   /**
101    * This returns the label text for the adapted class.
102    * <!-- begin-user-doc -->
103    * <!-- end-user-doc -->
104    * @generated NOT
105    */

106   public String JavaDoc getText(Object JavaDoc object)
107   {
108     String JavaDoc label = ((EChangeSummarySetting)object).getFeatureName();
109     return label == null ? "" : label;
110   }
111
112   /**
113    * This handles model notifications by calling {@link #updateChildren} to update any cached
114    * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
115    * <!-- begin-user-doc -->
116    * <!-- end-user-doc -->
117    * @generated
118    */

119   public void notifyChanged(Notification notification)
120   {
121     updateChildren(notification);
122     super.notifyChanged(notification);
123   }
124
125   /**
126    * Return the resource locator for this item provider's resources.
127    * <!-- begin-user-doc -->
128    * <!-- end-user-doc -->
129    * @generated
130    */

131   public ResourceLocator getResourceLocator()
132   {
133     return SDOEditPlugin.INSTANCE;
134   }
135
136 }
137
Popular Tags