1 17 package org.eclipse.emf.ecore.sdo.provider; 18 19 20 import java.util.List ; 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 42 public class EChangeSummarySettingItemProvider 43 extends FeatureChangeItemProvider 44 implements 45 IEditingDomainItemProvider, 46 IStructuredItemContentProvider, 47 ITreeItemContentProvider, 48 IItemLabelProvider, 49 IItemPropertySource 50 { 51 57 public EChangeSummarySettingItemProvider(AdapterFactory adapterFactory) 58 { 59 super(adapterFactory); 60 } 61 62 68 public List getPropertyDescriptors(Object object) 69 { 70 if (itemPropertyDescriptors == null) 71 { 72 super.getPropertyDescriptors(object); 73 74 addPropertyPropertyDescriptor(object); 75 } 76 return itemPropertyDescriptors; 77 } 78 79 85 protected void addPropertyPropertyDescriptor(Object 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 106 public String getText(Object object) 107 { 108 String label = ((EChangeSummarySetting)object).getFeatureName(); 109 return label == null ? "" : label; 110 } 111 112 119 public void notifyChanged(Notification notification) 120 { 121 updateChildren(notification); 122 super.notifyChanged(notification); 123 } 124 125 131 public ResourceLocator getResourceLocator() 132 { 133 return SDOEditPlugin.INSTANCE; 134 } 135 136 } 137 | Popular Tags |