1 17 package org.eclipse.emf.ecore.provider; 18 19 20 import java.util.Collection ; 21 import java.util.List ; 22 23 import org.eclipse.emf.common.notify.AdapterFactory; 24 import org.eclipse.emf.common.notify.Notification; 25 import org.eclipse.emf.common.util.ResourceLocator; 26 import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; 27 import org.eclipse.emf.edit.provider.IItemLabelProvider; 28 import org.eclipse.emf.edit.provider.IItemPropertySource; 29 import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; 30 import org.eclipse.emf.edit.provider.ITreeItemContentProvider; 31 import org.eclipse.emf.edit.provider.ItemProviderAdapter; 32 33 34 40 public class EObjectItemProvider 41 extends ItemProviderAdapter 42 implements 43 IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource 44 { 45 51 public EObjectItemProvider(AdapterFactory adapterFactory) 52 { 53 super(adapterFactory); 54 } 55 56 62 public List getPropertyDescriptors(Object object) 63 { 64 if (itemPropertyDescriptors == null) 65 { 66 super.getPropertyDescriptors(object); 67 68 } 69 return itemPropertyDescriptors; 70 } 71 72 78 public Object getImage(Object object) 79 { 80 return getResourceLocator().getImage("full/obj16/EObject"); 81 } 82 83 89 public String getText(Object object) 90 { 91 return getString("_UI_EObject_type"); 92 } 93 94 101 public void notifyChanged(Notification notification) 102 { 103 updateChildren(notification); 104 super.notifyChanged(notification); 105 } 106 107 114 protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) 115 { 116 super.collectNewChildDescriptors(newChildDescriptors, object); 117 } 118 119 125 public ResourceLocator getResourceLocator() 126 { 127 return EcoreEditPlugin.INSTANCE; 128 } 129 130 } 131 | Popular Tags |