1 7 package Olj.provider; 8 9 10 import Olj.OljFactory; 11 import Olj.OljPackage; 12 import Olj.TargetColumnsType; 13 14 import java.util.Collection ; 15 import java.util.List ; 16 17 import org.eclipse.emf.common.notify.AdapterFactory; 18 import org.eclipse.emf.common.notify.Notification; 19 20 import org.eclipse.emf.common.util.ResourceLocator; 21 22 import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; 23 import org.eclipse.emf.edit.provider.IItemLabelProvider; 24 import org.eclipse.emf.edit.provider.IItemPropertySource; 25 import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; 26 import org.eclipse.emf.edit.provider.ITreeItemContentProvider; 27 import org.eclipse.emf.edit.provider.ItemProviderAdapter; 28 import org.eclipse.emf.edit.provider.ViewerNotification; 29 30 36 public class TargetColumnsTypeItemProvider 37 extends ItemProviderAdapter 38 implements 39 IEditingDomainItemProvider, 40 IStructuredItemContentProvider, 41 ITreeItemContentProvider, 42 IItemLabelProvider, 43 IItemPropertySource { 44 50 public TargetColumnsTypeItemProvider(AdapterFactory adapterFactory) { 51 super(adapterFactory); 52 } 53 54 60 public List getPropertyDescriptors(Object object) { 61 if (itemPropertyDescriptors == null) { 62 super.getPropertyDescriptors(object); 63 64 } 65 return itemPropertyDescriptors; 66 } 67 68 76 public Collection getChildrenFeatures(Object object) { 77 if (childrenFeatures == null) { 78 super.getChildrenFeatures(object); 79 childrenFeatures.add(OljPackage.eINSTANCE.getTargetColumnsType_TargetColumn()); 80 } 81 return childrenFeatures; 82 } 83 84 90 public Object getImage(Object object) { 91 return getResourceLocator().getImage("full/obj16/TargetColumnsType"); 92 } 93 94 100 public String getText(Object object) { 101 return getString("_UI_TargetColumnsType_type"); 102 } 103 104 111 public void notifyChanged(Notification notification) { 112 updateChildren(notification); 113 114 switch (notification.getFeatureID(TargetColumnsType.class)) { 115 case OljPackage.TARGET_COLUMNS_TYPE__TARGET_COLUMN: 116 fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); 117 return; 118 } 119 super.notifyChanged(notification); 120 } 121 122 129 protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { 130 super.collectNewChildDescriptors(newChildDescriptors, object); 131 132 newChildDescriptors.add 133 (createChildParameter 134 (OljPackage.eINSTANCE.getTargetColumnsType_TargetColumn(), 135 OljFactory.eINSTANCE.createTargetColumnType())); 136 } 137 138 144 public ResourceLocator getResourceLocator() { 145 return OljEditPlugin.INSTANCE; 146 } 147 148 } 149 | Popular Tags |