1 17 package org.eclipse.emf.mapping.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 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 33 import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; 34 import org.eclipse.emf.mapping.MappingPackage; 35 import org.eclipse.emf.mapping.MappingPlugin; 36 37 39 40 43 public class ComplexTypeConverterItemProvider 44 extends TypeConverterItemProvider 45 implements 46 IEditingDomainItemProvider, 47 IStructuredItemContentProvider, 48 ITreeItemContentProvider, 49 IItemLabelProvider, 50 IItemPropertySource 51 { 52 55 public ComplexTypeConverterItemProvider(AdapterFactory adapterFactory) 56 { 57 super(adapterFactory); 58 } 59 60 63 public List getPropertyDescriptors(Object object) 64 { 65 if (itemPropertyDescriptors == null) 66 { 67 super.getPropertyDescriptors(object); 68 69 MappingPackage ePackage = MappingPackage.eINSTANCE; 71 72 itemPropertyDescriptors.add 75 (new ItemPropertyDescriptor 76 (adapterFactory, 77 MappingPlugin.getPlugin().getString("_UI_In2out_property_label"), 78 MappingPlugin.getPlugin().getString("_UI_In2out_property_description"), 79 ePackage.getComplexTypeConverter_In2out())); 80 81 itemPropertyDescriptors.add 84 (new ItemPropertyDescriptor 85 (adapterFactory, 86 MappingPlugin.getPlugin().getString("_UI_Out2in_property_label"), 87 MappingPlugin.getPlugin().getString("_UI_Out2in_property_description"), 88 ePackage.getComplexTypeConverter_Out2in())); 89 90 } 91 return itemPropertyDescriptors; 92 } 93 94 97 public Object getImage(Object object) 98 { 99 return MappingPlugin.getPlugin().getImage("full/obj16/ComplexTypeConverter"); 100 } 101 102 public String getText(Object object) 103 { 104 return "ComplexTypeConverter"; 105 } 106 107 110 public void notifyChanged(Notification msg) 111 { 112 MappingPackage ePackage = MappingPackage.eINSTANCE; 113 if (msg.getFeature() == ePackage.getComplexTypeConverter_In2out() || msg.getFeature() == ePackage.getComplexTypeConverter_Out2in()) 115 { 116 this.fireNotifyChanged(msg); 117 return; 119 } 120 super.notifyChanged(msg); 121 } 122 123 129 public ResourceLocator getResourceLocator() 130 { 131 return MappingPlugin.INSTANCE; 132 } 133 134 } 135 | Popular Tags |