Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2013-07-09 11:24:22 -0400
committervlorenzo2013-07-09 11:24:22 -0400
commitebbd4078d91ac0664fd669bfad7de96a0c375a0c (patch)
tree886a2c388dc9136e9e914bb8592b5a4ac84ccead /sandbox
parent23caf2e84ac57b98106e504a90ade17c46b76cee (diff)
downloadorg.eclipse.papyrus-ebbd4078d91ac0664fd669bfad7de96a0c375a0c.tar.gz
org.eclipse.papyrus-ebbd4078d91ac0664fd669bfad7de96a0c375a0c.tar.xz
org.eclipse.papyrus-ebbd4078d91ac0664fd669bfad7de96a0c375a0c.zip
400779: [Table 2] Tabular Editor must allow to create elements with a Paste from an external speadsheet
https://bugs.eclipse.org/bugs/show_bug.cgi?id=400779
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/.classpath7
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/.project28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/META-INF/MANIFEST.MF33
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/about.html28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/build.properties8
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/aggreg.gifbin0 -> 68 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/aggreg_unidir.gifbin0 -> 91 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/attributes.gifbin0 -> 124 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/inv_aggreg.gifbin0 -> 70 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/link.gifbin0 -> 67 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/link_unidir.gifbin0 -> 91 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/opposite_links.gifbin0 -> 68 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/plugin.pdoc4
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/plugin.xml50
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/Activator.java71
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/celleditor/config/EStructuralFeatureEditorConfig.java316
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectAxisManager.java204
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EStructuralFeatureAxisManager.java254
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java162
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/messages/Messages.java32
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/messages/messages.properties2
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFEObjectHeaderLabelProvider.java106
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFFeatureHeaderLabelProvider.java234
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/registry/EStructuralFeatureImageRegistry.java102
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/validator/IntegerDataValidator.java46
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/.classpath7
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/.project28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF47
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/about.html28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/build.properties9
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/plugin.pdoc5
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/plugin.xml61
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/Activator.java297
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/advice/DeletePageAdvice.java40
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/advice/DeletePageEditHelper.java44
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/advice/RemovePageHelper.java55
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/AddToResourceCommand.java100
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/CreateEAnnotationCommand.java145
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/IPapyrusDuplicateCommandConstants.java25
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/RemoveEAnnotationCommand.java76
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/RemoveFromResourcecommand.java132
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/UnsetCommand.java62
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/AnnotationObservableValue.java306
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/EMFObservableList.java366
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/EMFObservableValue.java102
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/dialog/CommandCreationProgressMonitorDialog.java102
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/Messages.java17
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/messages.properties1
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/AnyTypeLabelProvider.java64
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFContentProvider.java107
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFEnumeratorContentProvider.java57
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFFilteredLabelProvider.java53
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFGraphicalContentProvider.java482
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFLabelProvider.java326
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/HistoryContentProvider.java50
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/MoDiscoContentProvider.java119
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/SemanticFromModelExplorer.java43
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/StandardEMFLabelProvider.java222
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/strategy/ContainmentBrowseStrategy.java344
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/strategy/SemanticEMFContentProvider.java197
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/BusinessModelResolver.java56
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ConvertedValueContainer.java71
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EClassNameComparator.java35
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFContants.java37
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFHelper.java744
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFStringValueConverter.java331
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ENamedElementComparator.java35
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/HistoryUtil.java47
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/MultiConvertedValueContainer.java39
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ProviderHelper.java59
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ResourceUtils.java81
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceRegistryAdapterFactory.java58
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForEObject.java45
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForHandlers.java100
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForIEvaluationContext.java107
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForResource.java69
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForResourceInitializerService.java97
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForResourceSet.java49
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForSelection.java59
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/StringValueConverterStatus.java60
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/TextReferencesHelper.java218
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/TransactionalUnsetter.java61
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/.classpath7
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/.project28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/META-INF/MANIFEST.MF24
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/about.html28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/build.properties22
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractAxisConfiguration_labelConfiguration_EObjectLabelProviderConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractAxisConfiguration_labelConfiguration_FeatureLabelProviderConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractAxisConfiguration_labelConfiguration_ObjectLabelProviderConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractAxisProvider_axisConfiguration_AbstractAxisConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractAxisProvider_axisConfiguration_DefaultAxisConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractAxisProvider_labelConfiguration_FeatureLabelProviderConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_EStructuralFeatureValueFillingConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_FeatureAxisConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_IPasteConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_PasteEObjectConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfigurations_EStructuralFeatureValueFillingConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfigurations_FeatureAxisConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfigurations_IPasteConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfigurations_PasteEObjectConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedLabelConfiguration_FeatureLabelProviderConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedLabelConfiguration_ObjectLabelProviderConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedLabelConfigurations_FeatureLabelProviderConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedLabelConfigurations_ObjectLabelProviderConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractTableConfiguration_columnAxisProvider_DefaultAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractTableConfiguration_columnAxisProvider_EMFFeatureValueAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractTableConfiguration_rowAxisProvider_DefaultAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractTableConfiguration_rowAxisProvider_EMFFeatureValueAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_EObjectAxis.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_EStructuralFeatureAxis.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_FeatureIdAxis.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_ObjectIdAxis.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateDefaultAxisProvider_axis_EObjectAxis.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateDefaultAxisProvider_axis_IdAxis.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateDefaultContentProvider_axis_EObjectAxis.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateDefaultContentProvider_axis_IdAxis.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateFeatureAxis_localLabelConfiguration_FeatureLabelProviderConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateLocalTableHeaderAxisConfiguration_axisManagerConfigurations_AxisManagerConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateObjectAxis_localLabelConfiguration_FeatureLabelProviderConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateObjectAxis_localLabelConfiguration_ObjectLabelProviderConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnAxisProviders_MasterObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnAxisProviders_SlaveObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnHeaderAxisConfiguration_TableHeaderAxisConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_creationTester_JavaTableCreationTester.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_creationTester_JavaTableTester.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowAxisProviders_MasterObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowAxisProviders_SlaveObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowHeaderAxisConfiguration_TableHeaderAxisConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_defaultHorizontalAxisProvider_DefaultAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_defaultHorizontalAxisProvider_EMFFeatureValueAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_defaultHorizontalContentProvider_DefaultAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_defaultHorizontalContentProvider_DefaultContentProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_defaultHorizontalContentProvider_EMFFeatureContentProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_defaultHorizontalContentProvider_EMFFeatureValueAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_defaultVerticalAxisProvider_DefaultAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_defaultVerticalAxisProvider_EMFFeatureValueAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_defaultVerticalContentProvider_DefaultAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_defaultVerticalContentProvider_DefaultContentProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_defaultVerticalContentProvider_EMFFeatureContentProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_defaultVerticalContentProvider_EMFFeatureValueAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_horizontalAxisProvider_DefaultAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_horizontalAxisProvider_EMFFeatureValueAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_verticalAxisProvider_DefaultAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableEditorConfiguration_verticalAxisProvider_EMFFeatureValueAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableHeaderAxisConfiguration_axisManagers_AxisManagerRepresentation.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_cells_EObjectCell.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_cells_StringCell.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_columnAxisProvidersHistory_MasterObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_columnAxisProvidersHistory_SlaveObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_editorConfiguration_LocalTableEditorConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_editorConfiguration_TableConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_editorConfiguration_TableEditorConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_horizontalAxisProvider_DefaultAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_horizontalAxisProvider_EMFFeatureValueAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_horizontalContentProvider_DefaultContentProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_horizontalContentProvider_EMFFeatureContentProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_localColumnHeaderAxisConfiguration_LocalTableHeaderAxisConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_localRowHeaderAxisConfiguration_LocalTableHeaderAxisConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_rowAxisProvidersHistory_MasterObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_rowAxisProvidersHistory_SlaveObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_verticalAxisProvider_DefaultAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_verticalAxisProvider_EMFFeatureValueAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_verticalContentProvider_DefaultContentProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_verticalContentProvider_EMFFeatureContentProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/AbstractAxisConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/AxisManagerConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/AxisManagerRepresentation.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/DefaultAxisConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/DefaultAxisProvider.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/DefaultContentProvider.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EMFFeatureContentProvider.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EMFFeatureValueAxisProvider.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EObjectAxis.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EObjectCell.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EObjectLabelProviderConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EStructuralFeatureAxis.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EStructuralFeatureValueFillingConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/FeatureAxisConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/FeatureIdAxis.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/FeatureLabelProviderConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/IPasteConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/IdAxis.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/JavaTableCreationTester.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/JavaTableTester.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/LocalTableEditorConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/LocalTableHeaderAxisConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/MasterObjectAxisProvider.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/ObjectIdAxis.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/ObjectLabelProviderConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/PasteEObjectConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/PasteProblem.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/SlaveObjectAxisProvider.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/StringCell.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/Table.gifbin0 -> 965 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/TableConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/TableEditorConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/TableHeaderAxisConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/plugin.pdoc4
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties214
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/plugin.xml110
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/EObjectAxisItemProvider.java139
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/EStructuralFeatureAxisItemProvider.java139
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/FeatureAxisItemProvider.java215
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/FeatureIdAxisItemProvider.java156
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/IdAxisItemProvider.java199
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/NattableaxisItemProviderAdapterFactory.java282
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/ObjectAxisItemProvider.java220
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/ObjectIdAxisItemProvider.java161
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AbstractHeaderAxisConfigurationItemProvider.java299
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AxisManagerConfigurationItemProvider.java197
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AxisManagerRepresentationItemProvider.java233
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/EStructuralFeatureValueFillingConfigurationItemProvider.java151
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/FeatureAxisConfigurationItemProvider.java161
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/IPasteConfigurationItemProvider.java125
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/LocalTableHeaderAxisConfigurationItemProvider.java162
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/NattableaxisconfigurationItemProviderAdapterFactory.java378
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/PasteEObjectConfigurationItemProvider.java170
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/TableHeaderAxisConfigurationItemProvider.java162
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/AbstractAxisProviderItemProvider.java214
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/AxisProviderItemProvider.java165
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/MasterObjectAxisProviderItemProvider.java147
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/NattableaxisproviderItemProviderAdapterFactory.java234
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/SlaveObjectAxisProviderItemProvider.java114
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/NattableconfigurationItemProviderAdapterFactory.java210
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/TableConfigurationItemProvider.java350
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/TableNamedElementItemProvider.java212
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/FeatureLabelProviderConfigurationItemProvider.java217
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/NattablelabelproviderItemProviderAdapterFactory.java234
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/ObjectLabelProviderConfigurationItemProvider.java221
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/provider/AbstractTableTesterItemProvider.java157
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/provider/JavaTableTesterItemProvider.java147
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/provider/NattabletesterItemProviderAdapterFactory.java210
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/EObjectCellItemProvider.java201
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/NattableEditPlugin.java104
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/NattableItemProviderAdapterFactory.java257
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/PasteProblemItemProvider.java192
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/TableItemProvider.java368
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/.classpath8
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/.project28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/META-INF/MANIFEST.MF30
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/about.html28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/build.properties22
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableEditor.java86
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableaxisEditor.java87
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableaxisconfigurationEditor.java87
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableaxisproviderEditor.java86
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableconfigurationEditor.java86
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattablelabelproviderEditor.java86
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattabletesterEditor.java87
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/obj16/NattableModelFile.gifbin0 -> 346 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/obj16/NattableaxisModelFile.gifbin0 -> 346 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/obj16/NattableaxisconfigurationModelFile.gifbin0 -> 346 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/obj16/NattableaxisproviderModelFile.gifbin0 -> 346 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/obj16/NattableconfigurationModelFile.gifbin0 -> 346 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/obj16/NattablecontentproviderModelFile.gifbin0 -> 346 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/obj16/NattablelabelproviderModelFile.gifbin0 -> 346 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/obj16/NattabletesterModelFile.gifbin0 -> 346 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/wizban/NewNattable.gifbin0 -> 2462 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/wizban/NewNattableaxis.gifbin0 -> 2462 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/wizban/NewNattableaxisconfiguration.gifbin0 -> 2462 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/wizban/NewNattableaxisprovider.gifbin0 -> 2462 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/wizban/NewNattableconfiguration.gifbin0 -> 2462 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/wizban/NewNattablecontentprovider.gifbin0 -> 2462 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/wizban/NewNattablelabelprovider.gifbin0 -> 2462 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/wizban/NewNattabletester.gifbin0 -> 2462 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/plugin.pdoc4
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/plugin.properties114
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/plugin.xml223
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisActionBarContributor.java434
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisEditor.java1847
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisModelWizard.java639
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/presentation/NattableaxisconfigurationActionBarContributor.java434
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/presentation/NattableaxisconfigurationEditor.java1847
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/presentation/NattableaxisconfigurationModelWizard.java639
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/presentation/NattableaxisproviderActionBarContributor.java434
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/presentation/NattableaxisproviderEditor.java1847
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/presentation/NattableaxisproviderModelWizard.java639
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/presentation/NattableconfigurationActionBarContributor.java434
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/presentation/NattableconfigurationEditor.java1847
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/presentation/NattableconfigurationModelWizard.java639
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/presentation/NattablelabelproviderActionBarContributor.java434
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/presentation/NattablelabelproviderEditor.java1847
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/presentation/NattablelabelproviderModelWizard.java639
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterActionBarContributor.java434
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterEditor.java1847
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterModelWizard.java639
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/presentation/NattableActionBarContributor.java432
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/presentation/NattableEditor.java1845
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/presentation/NattableEditorPlugin.java106
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/presentation/NattableModelWizard.java637
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/.classpath7
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/.project28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/.settings/org.eclipse.jdt.ui.prefs54
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/META-INF/MANIFEST.MF37
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/about.html28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/build.properties22
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore653
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecorediag1001
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/model/nattable.genmodel55
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/model/nattableaxis.ecorediag336
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/model/nattableaxisprovider.ecorediag295
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/model/nattableonfiguration.ecorediag292
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/plugin.pdoc4
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/plugin.properties13
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/plugin.xml74
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/Activator.java67
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/EObjectCell.java87
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/ICell.java75
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/NattableFactory.java71
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/NattablePackage.java950
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/PasteProblem.java77
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/Problem.java28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/Status.java218
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/StringCell.java59
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/Table.java291
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/EObjectCellImpl.java269
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/NattableFactoryImpl.java125
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/NattablePackageImpl.java579
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/PasteProblemImpl.java217
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/TableImpl.java685
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/EObjectAxis.java60
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/EStructuralFeatureAxis.java64
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/FeatureAxis.java65
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/FeatureIdAxis.java31
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/IAxis.java117
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/IdAxis.java59
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/NattableaxisFactory.java80
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/NattableaxisPackage.java1038
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/ObjectAxis.java65
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/ObjectIdAxis.java31
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/impl/EObjectAxisImpl.java167
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/impl/EStructuralFeatureAxisImpl.java167
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/impl/FeatureAxisImpl.java347
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/impl/FeatureIdAxisImpl.java220
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/impl/IdAxisImpl.java322
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/impl/NattableaxisFactoryImpl.java139
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/impl/NattableaxisPackageImpl.java483
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/impl/ObjectAxisImpl.java347
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/impl/ObjectIdAxisImpl.java220
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/util/NattableaxisAdapterFactory.java256
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/util/NattableaxisSwitch.java280
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/AbstractHeaderAxisConfiguration.java191
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/AxisIndexStyle.java218
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/AxisManagerConfiguration.java110
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/AxisManagerRepresentation.java139
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/EStructuralFeatureValueFillingConfiguration.java65
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/FeatureAxisConfiguration.java63
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/IAxisConfiguration.java32
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/IFillingConfiguration.java31
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/IPasteConfiguration.java31
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/LocalTableHeaderAxisConfiguration.java54
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/NattableaxisconfigurationFactory.java116
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/NattableaxisconfigurationPackage.java1352
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/PasteEObjectConfiguration.java90
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/TableHeaderAxisConfiguration.java55
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/AbstractHeaderAxisConfigurationImpl.java434
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/AxisManagerConfigurationImpl.java272
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/AxisManagerRepresentationImpl.java333
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/EStructuralFeatureValueFillingConfigurationImpl.java168
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/FeatureAxisConfigurationImpl.java174
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/IPasteConfigurationImpl.java52
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/LocalTableHeaderAxisConfigurationImpl.java161
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/NattableaxisconfigurationFactoryImpl.java234
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/NattableaxisconfigurationPackageImpl.java748
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/PasteEObjectConfigurationImpl.java235
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/impl/TableHeaderAxisConfigurationImpl.java161
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/util/NattableaxisconfigurationAdapterFactory.java329
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/util/NattableaxisconfigurationSwitch.java358
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/util/NattableaxisconfigurationValidator.java372
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/AbstractAxisProvider.java53
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/AxisProvider.java56
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/IMasterAxisProvider.java64
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/ISlaveAxisProvider.java31
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/MasterObjectAxisProvider.java31
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/NattableaxisproviderFactory.java62
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/NattableaxisproviderPackage.java776
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/SlaveObjectAxisProvider.java31
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/impl/AbstractAxisProviderImpl.java296
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/impl/AxisProviderImpl.java162
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/impl/MasterObjectAxisProviderImpl.java173
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/impl/NattableaxisproviderFactoryImpl.java117
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/impl/NattableaxisproviderPackageImpl.java372
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/impl/SlaveObjectAxisProviderImpl.java50
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/util/NattableaxisproviderAdapterFactory.java259
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/util/NattableaxisproviderSwitch.java281
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/CellEditorDeclaration.java246
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/NattableconfigurationFactory.java53
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/NattableconfigurationPackage.java616
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/TableConfiguration.java296
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/TableNamedElement.java91
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/impl/NattableconfigurationFactoryImpl.java157
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/impl/NattableconfigurationPackageImpl.java467
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/impl/TableConfigurationImpl.java700
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/impl/TableNamedElementImpl.java228
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/util/NattableconfigurationAdapterFactory.java167
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/util/NattableconfigurationSwitch.java160
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/util/NattableconfigurationValidator.java221
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/FeatureLabelProviderConfiguration.java152
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/ILabelProviderConfiguration.java33
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/NattablelabelproviderFactory.java62
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/NattablelabelproviderPackage.java481
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/ObjectLabelProviderConfiguration.java93
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/impl/FeatureLabelProviderConfigurationImpl.java335
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/impl/NattablelabelproviderFactoryImpl.java117
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/impl/NattablelabelproviderPackageImpl.java331
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/impl/ObjectLabelProviderConfigurationImpl.java228
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/util/NattablelabelproviderAdapterFactory.java185
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/util/NattablelabelproviderSwitch.java184
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/AbstractTableTester.java45
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/JavaTableTester.java64
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/NattabletesterFactory.java53
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/NattabletesterPackage.java294
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/impl/AbstractTableTesterImpl.java81
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/impl/JavaTableTesterImpl.java173
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/impl/NattabletesterFactoryImpl.java106
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/impl/NattabletesterPackageImpl.java267
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/util/NattabletesterAdapterFactory.java167
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/util/NattabletesterSwitch.java160
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/util/NattableAdapterFactory.java241
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/util/NattableSwitch.java245
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/util/NattableValidator.java243
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model/tablemetamodeldocumentation.mediawiki80
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/.classpath7
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/.project28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/META-INF/MANIFEST.MF37
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/OSGI-INF/l10n/bundle.properties3
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/about.html28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/build.properties10
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/icons/nattablepageeditor.pngbin0 -> 282 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/icons/old/nattablepageeditor.gifbin0 -> 138 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/icons/old/nattablepageeditor.pngbin0 -> 194 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/plugin.xml56
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration19
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/Activator.java71
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/celleditor/ModelViewsCellEditorConfiguration.java78
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/manager/axis/EditorContextSynchronizerAxisManager.java193
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/manager/axis/EditorFeatureAxisManager.java85
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/manager/cell/ModelViewsCellManager.java280
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/messages/Messages.java19
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/messages/messages.properties2
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/provider/ModelViewsHeaderLabelProvider.java134
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/utils/TableViewCreationTester.java37
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/utils/Utils.java103
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/.classpath7
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/.project28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF52
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/OSGI-INF/l10n/bundle.properties3
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/about.html28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/build.properties11
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/CreateDestroyColumn.gifbin0 -> 928 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/CreateDestroyRow.gifbin0 -> 925 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/auto_resize_column.pngbin0 -> 3128 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/auto_resize_row.pngbin0 -> 378 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/columnIndex.pngbin0 -> 378 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/delete_obj.gifbin0 -> 351 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/empty.gifbin0 -> 919 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/empty.pngbin0 -> 1341 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/invertAxis.gifbin0 -> 896 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/label.pngbin0 -> 776 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/not_NA.gifbin0 -> 918 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/not_NA.pngbin0 -> 1283 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/remove_column.gifbin0 -> 859 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/remove_row.gifbin0 -> 91 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/rename.gifbin0 -> 922 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/rowIndex.pngbin0 -> 357 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/select_columns_to_show.pngbin0 -> 433 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/sort_columns_by_name_A_to_Z.gifbin0 -> 154 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/sort_columns_by_name_Z_to_A.gifbin0 -> 153 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/sort_rows_by_name_A_to_Z.gifbin0 -> 913 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/sort_rows_by_name_Z_to_A.gifbin0 -> 914 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/table.gifbin0 -> 965 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/table.pngbin0 -> 1347 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/tableColumnAction.gifbin0 -> 889 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/icons/tableRowAction.gifbin0 -> 884 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/plugin.pdoc4
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/plugin.xml976
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/schema/org.eclipse.papyrus.infra.nattable.axismanager.exsd127
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/schema/org.eclipse.papyrus.infra.nattable.celleditor.configuration.exsd135
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/schema/org.eclipse.papyrus.infra.nattable.cellmanager.exsd139
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/schema/org.eclipse.papyrus.infra.nattable.configuration.exsd127
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/schema/org.eclipse.papyrus.infra.nattable.tester.exsd129
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/Activator.java69
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/accumulator/CustomRowOverrideLabelAccumulator.java70
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/advice/DeleteNatTableContextAdvice.java73
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractComboAction.java84
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/ButtonConfiguration.java120
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/ComboBoxWithButtonCellEditor.java176
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/config/AbstractCellEditorConfiguration.java55
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/config/AbstractCellEditorConfigurationFactory.java111
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/config/CellEditorConfigurationFactory.java124
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/config/IAxisCellEditorConfiguration.java120
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/config/IAxisEStructuralFeatureCellEditorConfiguration.java33
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/command/CommandIds.java74
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/command/TableCommands.java310
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/CornerConfiguration.java77
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/CustomizedCellPainter.java163
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/EditConfiguration.java168
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusColumnHeaderStyleConfiguration.java43
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusColumnResizeBindingsConfiguration.java54
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java46
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusHeaderMenuConfiguration.java55
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusPopupMenuAction.java128
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusRowHeaderStyleConfiguration.java42
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusRowResizeBindingsConfiguration.java56
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/StyleConfiguration.java40
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/converter/GenericDisplayConverter.java94
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/copy/CopySelectionToClipboardAction.java46
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dataprovider/AbstractDataProvider.java68
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dataprovider/AbstractHeaderDataProvider.java202
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dataprovider/BodyDataProvider.java54
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dataprovider/ColumnHeaderDataProvider.java132
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dataprovider/RowHeaderDataProvider.java141
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/DisplayedAxisSelectorDialog.java127
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/exception/ErrorInPastePreparationException.java34
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/formatter/PapyrusExportFormatter.java45
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractChangeHeaderConfigurationHandler.java90
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractChangeIndexStyleHandler.java72
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractChangeLabelConfigurationValueHandler.java177
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractColumnChangeHeaderConfigurationHandler.java54
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractColumnChangeLabelConfigurationValueHandler.java79
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractDisconnectSlaveHandler.java77
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractRowChangeHeaderConfigurationHandler.java57
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractRowChangeLabelConfigurationValueHandler.java80
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractTableHandler.java238
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ChangeIndexColumnStyleHandler.java39
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ChangeIndexRowStyleHandler.java34
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ColumnAutoResizeHandler.java44
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ColumnDestroyAxisElementHandler.java64
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ColumnDestroyAxisHandler.java63
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ColumnDisplayIndexHeaderHandler.java38
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ColumnDisplayLabelFeatureIsDerivedHandler.java39
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ColumnDisplayLabelFeatureMultiplicityHandler.java39
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ColumnDisplayLabelFeatureNameHandler.java37
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ColumnDisplayLabelFeatureTypeHandler.java37
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ColumnDisplayLabelHeaderHandler.java38
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ColumnDisplayLabelImageHandler.java38
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ColumnDisplayLabelTextHandler.java39
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ColumnEditAliasHeaderHandler.java57
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ColumnMasterDisconnectRowSlaveHandler.java36
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ExportToXLSHandler.java31
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/InvertAxisHandler.java41
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/PrintTableHandler.java43
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/RowAutoResizeHandler.java45
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/RowDestroyAxisElementHandler.java64
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/RowDestroyAxisHandler.java63
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/RowDisplayIndexHeaderHandler.java37
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/RowDisplayLabeTextHandler.java39
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/RowDisplayLabelFeatureIsDerivedHandler.java38
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/RowDisplayLabelFeatureMultiplicityHandler.java38
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/RowDisplayLabelFeatureNameHandler.java38
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/RowDisplayLabelFeatureTypeHandler.java38
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/RowDisplayLabelHeaderHandler.java37
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/RowDisplayLabelImageHandler.java38
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/RowEditAliasHeaderHandler.java57
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/RowMasterDisconnectColumnSlaveHandler.java36
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SelectAllHandler.java35
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SelectColumnsHandler.java54
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SelectRowsHandler.java54
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SortColumnsHandler.java60
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/SortRowsHandler.java59
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/helper/advice/DestroyTableAdviceHelper.java9
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/helper/advice/TableContentsAdviceHelper.java90
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/layer/PapyrusGridLayer.java77
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/layer/PapyrusSelectionLayer.java90
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/layerstack/BodyLayerStack.java115
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/layerstack/ColumnHeaderLayerStack.java44
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/layerstack/RowHeaderLayerStack.java80
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/listener/NatTableDropListener.java139
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractAxisManager.java567
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AbstractSynchronizedOnFeatureAxisManager.java306
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/AxisManagerFactory.java84
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java562
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/IAxisManager.java295
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/ICompositeAxisManager.java52
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/InputDialogWithLocation.java68
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/AbstractCellManager.java45
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/CellManagerFactory.java126
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java114
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java461
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/ILimitedNattableModelManager.java25
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java184
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/ITableAxisElementProvider.java29
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java1036
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java192
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties82
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/nattableconfiguration/NattableConfigurationRegistry.java158
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/painter/CustomCheckBoxPainter.java49
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/painter/CustomImagePainter.java51
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/AbstractNattableCellLabelProvider.java175
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/GenericCellLabelProvider.java78
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/IndexHeaderLabelProvider.java53
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/NattableTopLabelProvider.java255
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java157
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java128
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/tmp/CompoundFilteredRestrictedContentProvider.java145
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/tmp/FlattenableRestrictedFilteredContentProvider.java192
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/tmp/IIgnoreStereotypeBasePropertyContentProvider.java41
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/tmp/IInheritedElementContentProvider.java40
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/tmp/IRestrictedContentProvider.java39
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/reorder/CustomCellDragModeForColumn.java89
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/reorder/CustomColumnReorderDragMode.java85
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/reorder/CustomDefaultColumnReorderBindings.java58
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/tester/ITableTester.java34
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/tester/TableTesterRegistry.java72
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/AxisComparator.java92
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/AxisUtils.java127
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/Constants.java57
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/HeaderAxisConfigurationManagementUtils.java167
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/ILabelProviderCellContextElementWrapper.java30
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/ILabelProviderContextElementWrapper.java41
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/IPasteInTableCommandProvider.java72
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/LabelConfigurationManagementUtils.java310
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/LabelProviderCellContextElementWrapper.java221
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/LabelProviderContextElementWrapper.java70
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/LocationValue.java229
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/NattableConfigAttributes.java67
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/NattableWidgetPropertyTester.java85
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteConfigurationUtil.java35
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/StringComparator.java34
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TableClipboardUtils.java60
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TableEditingDomainuUtils.java75
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TableGridRegion.java23
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TableHelper.java110
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/widget/NatComboButton.java256
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/.classpath7
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/.project28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/META-INF/MANIFEST.MF22
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/OSGI-INF/l10n/bundle.properties3
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/about.html28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/build.properties7
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/Activator.java63
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/AggregatedObservable.java47
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/MultipleObservableList.java177
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/databinding/MultipleObservableValue.java180
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/AbstractCreateMenuFromCommandCategory.java136
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/BooleanHelper.java38
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/ClassLoaderHelper.java139
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/ClipboardUtils.java80
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/EclipseCommandUtils.java81
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/EditorHelper.java51
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/IntegerAndSpreadsheetNumberConverter.java90
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/ListHelper.java81
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/PlatformHelper.java21
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/ReflectHelper.java55
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/TypesConstants.java38
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/WorkbenchPartHelper.java51
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/.classpath7
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/.project28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/META-INF/MANIFEST.MF43
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/OSGI-INF/l10n/bundle.properties3
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/about.html28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/build.properties10
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/icons/aggreg_shared.gifbin0 -> 853 bytes
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/plugin.pdoc4
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/plugin.xml109
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/Activator.java71
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLFeatureCellEditorConfig.java498
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/dataprovider/UMLSingleReferenceComboBoxDataProvider.java204
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/dataprovider/UMLStereotypeSingleEnumerationComboBoxDataProvider.java101
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/AbstractUMLMultiValueCellEditor.java250
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/MultiBooleanCellEditor.java68
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/MultiEnumCellEditor.java71
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/MultiIntegerCellEditor.java45
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/MultiRealCellEditor.java41
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/MultiReferenceCellEditor.java74
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/MultiStringCellEditor.java69
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/MultiUnlimitedNaturalCellEditor.java68
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/handler/PasteInPapyrusTableCommandProvider.java353
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/handler/RowPasteHandler.java203
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/AbstractUMLSynchronizedOnFeatureAxisManager.java60
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/ClassifierDerivedSubSetAdapter.java470
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/PackageDerivedSubsetAdapter.java76
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/PapyrusUMLDerivedSubsetAdapter.java836
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/StructuredClassifierDerivedSubsetAdapter.java204
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLElementAxisManager.java60
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLFeatureAxisManager.java39
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/axis/UMLStereotypePropertyAxisManager.java298
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/StereotypePropertyCellManager.java114
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/UMLFeatureCellManager.java425
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java17
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties1
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/AbstractUMLNattableCellLabelProvider.java86
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/StereotypePropertyCellLabelProvider.java51
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/StereotypePropertyHeaderLabelProvider.java163
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/UMLFeatureRestrictedContentProvider.java232
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/UMLStereotypeRestrictedPropertyContentProvider.java398
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/UMLUnlimitedNaturalLabelProvider.java82
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/tmp/AbstractRestrictedContentProvider.java107
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/tmp/UMLStereotypePropertyContentProvider.java265
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/tester/IsUMLElementTester.java43
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/Constants.java31
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java90
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/validator/RealDataValidator.java41
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/validator/UnlimitedNaturalDataValidator.java40
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/widget/UMLDialogComboAction.java147
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/.classpath7
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/.project33
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/META-INF/MANIFEST.MF23
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/about.html28
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/build.properties7
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/plugin.properties12
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/Activator.java172
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ActivityUtil.java69
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CollaborationUseUtil.java85
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ControlFlowUtil.java47
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/DataTypeUtil.java47
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ElementUtil.java411
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/EnumerationUtil.java118
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ExecutionSpecificationUtil.java50
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ExtensionPointUtil.java40
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ICustomAppearence.java173
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ImageUtil.java473
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/InstanceSpecificationUtil.java76
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/MultiplicityElementUtil.java106
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/NameResolutionHelper.java160
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/NameResolutionUtils.java386
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/NamedElementUtil.java186
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ObjectFlowUtil.java299
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/OpaqueBehaviorUtil.java109
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/OpaqueExpressionUtil.java120
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/OperationUtil.java221
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PackageUtil.java589
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ParameterUtil.java225
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PortUtil.java102
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PrimitivesTypesUtils.java45
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ProfileUtil.java234
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PropertyUtil.java352
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/SignalUtil.java77
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/StereotypeUtil.java686
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/TemplateSignatureUtil.java72
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/TypeUtil.java70
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/TypedElementUtil.java26
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/UMLStringValueConverter.java250
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/UMLUtil.java324
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ValueSpecificationUtil.java334
741 files changed, 98930 insertions, 0 deletions
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/.classpath b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/.classpath
new file mode 100644
index 00000000000..6c79a3a9e3f
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry excluding="org/eclipse/papyrus/infra/emf/nattable/celleditor/editors/EMFSingleEBooleanCheckBoxCellEditorConfig.java|org/eclipse/papyrus/infra/emf/nattable/celleditor/editors/EMFSingleEEnumEditorConfig.java|org/eclipse/papyrus/infra/emf/nattable/celleditor/editors/EMFSingleEIntCellEditorConfig.java|org/eclipse/papyrus/infra/emf/nattable/celleditor/editors/EMFSingleEStringCellEditorConfig.java|org/eclipse/papyrus/infra/emf/nattable/celleditor/registry/EMFFeatureCellEditorFactory.java" kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/.project b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/.project
new file mode 100644
index 00000000000..2c06e6705e9
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.emf.nattable</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/META-INF/MANIFEST.MF b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..b31a455ebf8
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/META-INF/MANIFEST.MF
@@ -0,0 +1,33 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.1",
+ org.eclipse.nebula.widgets.nattable.core;bundle-version="1.0.0",
+ org.eclipse.emf.ecore;bundle-version="2.9.0",
+ org.eclipse.papyrus.infra.nattable.model;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.nattable;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.emf;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.core;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.widgets;bundle-version="0.10.1",
+ org.eclipse.emf.edit,
+ org.eclipse.papyrus.infra.services.edit;bundle-version="0.10.1",
+ org.eclipse.gmf.runtime.emf.type.core,
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="0.10.1"
+Export-Package: org.eclipse.papyrus.infra.emf.nattable,
+ org.eclipse.papyrus.infra.emf.nattable.celleditor.config,
+ org.eclipse.papyrus.infra.emf.nattable.manager.axis,
+ org.eclipse.papyrus.infra.emf.nattable.manager.cell,
+ org.eclipse.papyrus.infra.emf.nattable.provider,
+ org.eclipse.papyrus.infra.emf.nattable.registry,
+ org.eclipse.papyrus.infra.emf.nattable.validator
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.10.1.qualifier
+Bundle-Name: EMF Nattable (Incubation)
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.emf.nattable.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.infra.emf.nattable;singleton:
+ =true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/about.html b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/about.html
new file mode 100644
index 00000000000..598b3684879
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 12, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/build.properties b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/build.properties
new file mode 100644
index 00000000000..feffce05748
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ icons/
+src.includes = about.html
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/aggreg.gif b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/aggreg.gif
new file mode 100644
index 00000000000..2c62284e92b
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/aggreg.gif
Binary files differ
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/aggreg_unidir.gif b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/aggreg_unidir.gif
new file mode 100644
index 00000000000..30bf63ea561
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/aggreg_unidir.gif
Binary files differ
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/attributes.gif b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/attributes.gif
new file mode 100644
index 00000000000..d4cb4254d92
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/attributes.gif
Binary files differ
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/inv_aggreg.gif b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/inv_aggreg.gif
new file mode 100644
index 00000000000..6f1021d4d1c
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/inv_aggreg.gif
Binary files differ
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/link.gif b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/link.gif
new file mode 100644
index 00000000000..94c14024075
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/link.gif
Binary files differ
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/link_unidir.gif b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/link_unidir.gif
new file mode 100644
index 00000000000..c8169bcfbf8
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/link_unidir.gif
Binary files differ
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/opposite_links.gif b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/opposite_links.gif
new file mode 100644
index 00000000000..63520975df7
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/icons/opposite_links.gif
Binary files differ
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/plugin.pdoc b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/plugin.pdoc
new file mode 100644
index 00000000000..58d0d3e5769
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/plugin.pdoc
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin provides the EMF celleditors for the papyrus nattable widget">
+ <referent firstName="Vincent" lastName="LORENZO" eMail="vincent.lorenzo@cea.fr" currentCompany="CEA LIST"/>
+</doc:Documentation>
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/plugin.xml b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/plugin.xml
new file mode 100644
index 00000000000..5801e449bed
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/plugin.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.celleditor.configuration">
+ <configuration
+ class="org.eclipse.papyrus.infra.emf.nattable.celleditor.config.EStructuralFeatureEditorConfig"
+ order="1000">
+ </configuration>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.services.labelprovider.labelProvider">
+ <labelProvider
+ priority="1400"
+ provider="org.eclipse.papyrus.infra.emf.nattable.provider.EMFFeatureHeaderLabelProvider">
+ <labelProviderContext
+ context="org.eclipse.papyrus.infra.nattable.header.labelprovider">
+ </labelProviderContext>
+ <labelProviderContext
+ context="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider">
+ </labelProviderContext>
+ </labelProvider>
+ <labelProvider
+ priority="1500"
+ provider="org.eclipse.papyrus.infra.emf.nattable.provider.EMFEObjectHeaderLabelProvider">
+ <labelProviderContext
+ context="org.eclipse.papyrus.infra.nattable.header.labelprovider">
+ </labelProviderContext>
+ </labelProvider>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.axismanager">
+ <axisManager
+ id="org.eclipse.papyrus.infra.emf.nattable.user.axis.manager"
+ manager="org.eclipse.papyrus.infra.emf.nattable.manager.axis.EObjectAxisManager">
+ </axisManager>
+ <axisManager
+ id="org.eclipse.papyrus.infra.emf.nattable.feature.axis.manager"
+ manager="org.eclipse.papyrus.infra.emf.nattable.manager.axis.EStructuralFeatureAxisManager">
+ </axisManager>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.cellmanager">
+ <cellManager
+ id="org.eclipse.papyrus.infra.emf.nattable.cell.manager"
+ manager="org.eclipse.papyrus.infra.emf.nattable.manager.cell.EMFFeatureValueCellManager"
+ order="1000">
+ </cellManager>
+ </extension>
+</plugin>
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/Activator.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/Activator.java
new file mode 100644
index 00000000000..82a08b67971
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/Activator.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.nattable;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.emf.nattable"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/celleditor/config/EStructuralFeatureEditorConfig.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/celleditor/config/EStructuralFeatureEditorConfig.java
new file mode 100644
index 00000000000..d1cf39d98d0
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/celleditor/config/EStructuralFeatureEditorConfig.java
@@ -0,0 +1,316 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.nattable.celleditor.config;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EEnumLiteral;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
+import org.eclipse.nebula.widgets.nattable.data.convert.DefaultBooleanDisplayConverter;
+import org.eclipse.nebula.widgets.nattable.data.convert.DefaultIntegerDisplayConverter;
+import org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter;
+import org.eclipse.nebula.widgets.nattable.data.convert.IDisplayConverter;
+import org.eclipse.nebula.widgets.nattable.data.validate.IDataValidator;
+import org.eclipse.nebula.widgets.nattable.edit.editor.CheckBoxCellEditor;
+import org.eclipse.nebula.widgets.nattable.edit.editor.ComboBoxCellEditor;
+import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor;
+import org.eclipse.nebula.widgets.nattable.edit.editor.IComboBoxDataProvider;
+import org.eclipse.nebula.widgets.nattable.edit.editor.MultiLineTextCellEditor;
+import org.eclipse.nebula.widgets.nattable.edit.editor.TextCellEditor;
+import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
+import org.eclipse.nebula.widgets.nattable.painter.cell.ComboBoxPainter;
+import org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter;
+import org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter;
+import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.nattable.celleditor.config.AbstractCellEditorConfiguration;
+import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.painter.CustomCheckBoxPainter;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * The configuration to edit EMF properties
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class EStructuralFeatureEditorConfig extends AbstractCellEditorConfiguration {
+
+ /**
+ * the id of the editor config
+ */
+ public static final String EDITOR_CONFIG_ID = "EMF_EDITOR";
+
+ /**
+ * the int used to identify the kind of editor
+ */
+ public static final int UNKNOWN_TYPE = -1;
+
+ public static final int SINGLE_BOOLEAN = 1;
+
+ public static final int MULTI_BOOLEAN = SINGLE_BOOLEAN + 1;
+
+ public static final int SINGLE_STRING = MULTI_BOOLEAN + 1;
+
+ public static final int MULTI_STRING = SINGLE_STRING + 1;
+
+ public static final int SINGLE_INTEGER = MULTI_STRING + 1;
+
+ public static final int MULTI_INTEGER = SINGLE_INTEGER + 1;
+
+ public static final int SINGLE_EENUM_TYPE = MULTI_INTEGER + 1;
+
+ public static final int MULTI_EENUM_TYPE = SINGLE_EENUM_TYPE + 1;
+
+ public static final int SINGLE_EMF_REFERENCE = MULTI_EENUM_TYPE + 1;
+
+ public static final int MULTI_EMF_REFERENCE = SINGLE_EMF_REFERENCE + 1;
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getICellEditor(org.eclipse.papyrus.infra.nattable.model.nattable.Table,
+ * java.lang.Object, org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider)
+ *
+ * @param table
+ * @param axisElement
+ * @param elementProvider
+ * @return
+ */
+ public ICellEditor getICellEditor(Table table, final Object axisElement, final ITableAxisElementProvider elementProvider) {
+ int editorKind = getFeatureIdentifier(table, axisElement);
+ ICellEditor editor = null;
+ switch(editorKind) {
+ case SINGLE_STRING:
+ editor = new MultiLineTextCellEditor(true);
+ break;
+ case SINGLE_INTEGER:
+ editor = new TextCellEditor();
+ break;
+ case SINGLE_BOOLEAN:
+ editor = new CheckBoxCellEditor();
+ break;
+ case SINGLE_EENUM_TYPE:
+ editor = new ComboBoxCellEditor(new IComboBoxDataProvider() {//FIXME add a method to get the dataprovider!
+
+
+ public List<?> getValues(int columnIndex, int rowIndex) {
+ Object el = elementProvider.getColumnElement(columnIndex);
+ // Object el = elementProvider.getColumnElement(columnIndex);
+ List<Object> literals = new ArrayList<Object>();
+ for(final EEnumLiteral instances : ((EEnum)((EStructuralFeature)axisElement).getEType()).getELiterals()) {
+ literals.add(instances.getInstance());
+ }
+ return literals;
+ }
+ });
+ break;
+ default:
+ }
+ return editor;
+ }
+
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getEditorId()
+ *
+ * @return
+ */
+ public String getEditorId() {
+ return EDITOR_CONFIG_ID;
+ }
+
+ /**
+ * Return the combo data provider. This method is not in the interface, because it can't be generalized to all editors. It is used only by
+ * ComboBox
+ *
+ * @param table
+ * the edited table
+ * @param axisElement
+ * the axis element
+ * @param elementProvider
+ * the element provider
+ * @return
+ * the combo data provider
+ */
+ protected IComboBoxDataProvider getComboDataProvider(final Table table, final Object axisElement, final ITableAxisElementProvider elementProvider) {
+ return null;
+ }
+
+ /**
+ * @param provider
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.configs.conf#getDisplayConvert(Object, Table, org.eclipse.jface.viewers.ILabelProvider)
+ *
+ * @return
+ */
+
+ public IDisplayConverter getDisplayConvert(Object axisElement, Table table, final ILabelProvider provider) {
+ int editorKind = getFeatureIdentifier(table, axisElement);
+ IDisplayConverter displayConverter = null;
+ switch(editorKind) {
+ case SINGLE_BOOLEAN:
+ displayConverter = new DefaultBooleanDisplayConverter();
+ break;
+ case SINGLE_INTEGER:
+ displayConverter = new DefaultIntegerDisplayConverter();
+ break;
+ case SINGLE_EENUM_TYPE:
+ displayConverter = new DisplayConverter() {
+
+ @Override
+ public Object displayToCanonicalValue(Object displayValue) {
+ return null;
+ }
+
+ @Override
+ public Object canonicalToDisplayValue(Object canonicalValue) {
+ return provider.getText(canonicalValue);
+ }
+ };
+ break;
+ default:
+ }
+ return displayConverter;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getCellPainter(org.eclipse.papyrus.infra.nattable.model.nattable.Table,
+ * java.lang.Object)
+ *
+ * @param table
+ * @param axisElement
+ * @return
+ */
+ public ICellPainter getCellPainter(Table table, Object axisElement) {
+ int editorKind = getFeatureIdentifier(table, axisElement);
+ ICellPainter cellPainter = null;
+ switch(editorKind) {
+ case SINGLE_BOOLEAN:
+ cellPainter = new CustomCheckBoxPainter();
+ break;
+ case SINGLE_EENUM_TYPE:
+ cellPainter = new ComboBoxPainter();
+ break;
+ default:
+ cellPainter = new TextPainter(){
+
+ @Override
+ protected Color getBackgroundColour(ILayerCell cell, IConfigRegistry configRegistry) {
+ int rowPosition = cell.getRowPosition();
+ int columnPostion = cell.getColumnPosition();
+ return new Color(Display.getDefault(), new RGB(255, 0, 0));
+
+// return super.getBackgroundColour(cell, configRegistry);
+ }
+ };//FIXME : seems overriden by the CustomizedCellPainter... -> the result is correct, but our code is maybe incorrect
+ break;
+ }
+ return cellPainter;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDisplayMode(org.eclipse.papyrus.infra.nattable.model.nattable.Table,
+ * java.lang.Object)
+ *
+ * @param table
+ * @param axisElement
+ * @return
+ */
+ public String getDisplayMode(Table table, Object axisElement) {
+ int editorKind = getFeatureIdentifier(table, axisElement);
+ String displayMode = DisplayMode.EDIT;
+ switch(editorKind) {
+ case SINGLE_BOOLEAN:
+ displayMode = DisplayMode.NORMAL;
+ break;
+ default:
+ }
+ return displayMode;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.AbstractCellEditorConfiguration#getDataValidator(org.eclipse.papyrus.infra.nattable.model.nattable.Table,
+ * java.lang.Object)
+ *
+ * @param table
+ * @param axisElement
+ * @return
+ */
+ @Override
+ public IDataValidator getDataValidator(Table table, Object axisElement) {
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#handles(org.eclipse.papyrus.infra.nattable.model.nattable.Table,
+ * java.lang.Object)
+ *
+ * @param table
+ * @param axisElement
+ * @return
+ * <code>true</code> if axisElement is a {@link EStructuralFeature}
+ */
+ public boolean handles(Table table, Object axisElement) {
+ return axisElement instanceof EStructuralFeature;
+ }
+
+ /**
+ *
+ * @param table
+ * the edited table
+ * @param axisElement
+ * the edited feature
+ * @return
+ * an integer which identify the type of the feature or {@value #UNKNOWN_TYPE} if we can't found it
+ */
+ protected int getFeatureIdentifier(final Table table, final Object axisElement) {
+ int editorKind = UNKNOWN_TYPE;
+ assert axisElement instanceof EStructuralFeature;
+ final EStructuralFeature feature = (EStructuralFeature)axisElement;
+ final EClassifier eType = feature.getEType();
+ boolean isMany = feature.isMany();
+ if(eType instanceof EEnum) {
+ if(isMany) {
+ editorKind = MULTI_EENUM_TYPE;
+ } else {
+ editorKind = SINGLE_EENUM_TYPE;
+ }
+ } else if(eType instanceof EDataType) {
+
+ } else if(EMFHelper.isSuperType(EcorePackage.eINSTANCE.getEObject(), eType)) {
+ if(isMany) {
+ editorKind = MULTI_EMF_REFERENCE;
+ } else {
+ editorKind = SINGLE_EMF_REFERENCE;
+ }
+ }
+ return editorKind;
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectAxisManager.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectAxisManager.java
new file mode 100644
index 00000000000..7369266c984
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectAxisManager.java
@@ -0,0 +1,204 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.nattable.manager.axis;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderPackage;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+
+/**
+ *
+ * This manager is a master manager, that's to say, it doesn't listen the contents of the others managers.
+ * This manager modify the model for each changes on axis (so each axis is stored)
+ *
+ */
+public class EObjectAxisManager extends AbstractAxisManager {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getAddAxisCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * java.util.Collection)
+ *
+ * @param domain
+ * the editing domain
+ * @param objectToAdd
+ * the object to add to this axis
+ * @return
+ * the command to create the required axis in the model
+ */
+ @Override
+ public Command getAddAxisCommand(final EditingDomain domain, final Collection<Object> objectToAdd) {
+ final CompoundCommand cmd = new CompoundCommand(Messages.EObjectManager_AddAxisElement);
+ for(final Object object : objectToAdd) {
+ if(isAllowedContents(object)) {
+ final EObjectAxis horizontalAxis = NattableaxisFactory.eINSTANCE.createEObjectAxis();
+ horizontalAxis.setElement((EObject)object);
+ horizontalAxis.setManager(this.representedAxisManager);
+ final Command tmp = AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), horizontalAxis);
+ cmd.append(tmp);
+ }
+ }
+ return cmd;
+ }
+
+ /**
+ * This manager doesn't add axis on the other side, because it is a master axis manager
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getComplementaryAddAxisCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * java.util.Collection)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @return
+ */
+ @Override
+ public Command getComplementaryAddAxisCommand(final EditingDomain domain, final Collection<Object> objectToAdd) {
+ return null;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#isAllowedContents(java.lang.Object)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ public boolean isAllowedContents(Object object) {
+ boolean isAllowed = super.isAllowedContents(object);
+ if(isAllowed) {
+ return object instanceof EObject;
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canDropAxisElement(java.util.Collection)
+ *
+ * @param objectsToAdd
+ * @return
+ */
+ @Override
+ public boolean canDropAxisElement(Collection<Object> objectsToAdd) {
+ for(Object object : objectsToAdd) {
+ if(isAllowedContents(object)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.ISubAxisManager#isDynamic()
+ *
+ * @return
+ */
+ public boolean isDynamic() {
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#isSlave()
+ *
+ * @return
+ */
+ public boolean isSlave() {
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#canEditAxisHeader()
+ *
+ * @return
+ */
+ public boolean canEditAxisHeader() {
+ return false;
+ }
+
+
+ @Override
+ public String getElementAxisName(IAxis axis) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#canDestroyAxisElement(org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis)
+ *
+ * @param axis
+ * @return
+ */
+ public boolean canDestroyAxisElement(final IAxis axis) {
+ final EObject object = (EObject)axis.getElement();
+ return !EMFHelper.isReadOnly(object);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#canDestroyAxisElement(java.lang.Integer)
+ *
+ * @param axisPosition
+ * @return
+ */
+ public boolean canDestroyAxisElement(Integer axisPosition) {
+ final Object current = getElements().get(axisPosition);
+ if(current instanceof EObjectAxis) {
+ return !EMFHelper.isReadOnly(((EObjectAxis)current).getElement());
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#getDestroyAxisElementCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * java.lang.Integer)
+ *
+ * @param domain
+ * @param axisPosition
+ * @return
+ */
+ public Command getDestroyAxisElementCommand(EditingDomain domain, Integer axisPosition) {
+ final Object current = getElements().get(axisPosition);
+ if(current instanceof EObjectAxis) {
+ final EObject element = ((EObjectAxis)current).getElement();
+ final DestroyElementRequest request = new DestroyElementRequest((TransactionalEditingDomain)getContextEditingDomain(), element, false);
+ final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(element);
+ return new GMFtoEMFCommandWrapper(provider.getEditCommand(request));
+ }
+ return null;
+ }
+
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EStructuralFeatureAxisManager.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EStructuralFeatureAxisManager.java
new file mode 100644
index 00000000000..6f48d80de62
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EStructuralFeatureAxisManager.java
@@ -0,0 +1,254 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.nattable.manager.axis;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderPackage;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+
+/**
+ * the axis manager for EStructuralFeature
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class EStructuralFeatureAxisManager extends AbstractAxisManager {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getComplementaryAddAxisCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * java.util.Collection)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @return
+ */
+ @Override
+ public Command getComplementaryAddAxisCommand(final EditingDomain domain, final Collection<Object> objectToAdd) {
+ final Set<Object> features = new HashSet<Object>();
+ for(final Object current : objectToAdd) {
+ if(current instanceof EObject) {
+ features.addAll(((EObject)current).eClass().getEAllStructuralFeatures());
+ }
+ }
+ features.removeAll(getTableManager().getElementsList(getRepresentedContentProvider()));
+ if(!features.isEmpty()) {
+ return getAddAxisCommand(domain, features);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getAddAxisCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * java.util.Collection)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @return
+ */
+ @Override
+ public Command getAddAxisCommand(EditingDomain domain, Collection<Object> objectToAdd) {
+ final Collection<IAxis> toAdd = new ArrayList<IAxis>();
+ for(final Object current : objectToAdd) {
+ if(isAllowedContents(current)) {
+ final EStructuralFeatureAxis newAxis = NattableaxisFactory.eINSTANCE.createEStructuralFeatureAxis();
+ newAxis.setElement((EStructuralFeature)current);
+ newAxis.setManager(this.representedAxisManager);
+ toAdd.add(newAxis);
+ }
+ }
+ if(!toAdd.isEmpty()) {
+ return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getDestroyAxisCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * java.util.Collection)
+ *
+ * @param domain
+ * @param objectToDestroy
+ * @return
+ */
+ @Override
+ public Command getDestroyAxisCommand(EditingDomain domain, Collection<Object> objectToDestroy) {//FIXME must be done in the abstract class
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(getRepresentedContentProvider());
+ final CompositeCommand compositeCommand = new CompositeCommand("Destroy IAxis Command");
+ for(final IAxis current : getRepresentedContentProvider().getAxis()) {
+ if(current.getManager() == this.representedAxisManager) {
+ if(objectToDestroy.contains(current) || objectToDestroy.contains(current.getElement())) {
+ final DestroyElementRequest request = new DestroyElementRequest((TransactionalEditingDomain)domain, current, false);
+ compositeCommand.add(provider.getEditCommand(request));
+ }
+ }
+ }
+ if(!compositeCommand.isEmpty()) {
+ return new GMFtoEMFCommandWrapper(compositeCommand);
+ }
+ return null;
+
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#isAllowedContents(java.lang.Object)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ public boolean isAllowedContents(Object object) {
+ boolean isAllowed = super.isAllowedContents(object);
+ if(isAllowed) {
+ return object instanceof EStructuralFeature;
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canInsertAxis(java.util.Collection, int)
+ *
+ * @param objectsToAdd
+ * @param index
+ * @return
+ */
+ @Override
+ public boolean canInsertAxis(Collection<Object> objectsToAdd, int index) {
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canDropAxisElement(java.util.Collection)
+ *
+ * @param objectsToAdd
+ * @return
+ */
+ @Override
+ public boolean canDropAxisElement(Collection<Object> objectsToAdd) {
+ for(Object object : objectsToAdd) {
+ if(isAllowedContents(object)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * calculus of the contents of the axis
+ */
+
+ public Collection<Object> getAllPossibleAxis() {
+ Set<Object> objects = new HashSet<Object>();
+ for(final Object current : getAllManagedAxis()) {
+ EClass eClass = (EClass)current;
+ EPackage ePackage = eClass.getEPackage();
+ if(!eClass.getEStructuralFeatures().isEmpty()) {
+ objects.add(ePackage);
+ }
+ }
+ return objects;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.ISubAxisManager#isDynamic()
+ *
+ * @return
+ */
+ public boolean isDynamic() {
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#isSlave()
+ *
+ * @return
+ */
+ public boolean isSlave() {
+ return true;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#canEditAxisHeader()
+ *
+ * @return
+ */
+ public boolean canEditAxisHeader() {
+ return true;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getElementAxisName(org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis)
+ *
+ * @param axis
+ * @return
+ */
+ @Override
+ public String getElementAxisName(IAxis axis) {
+ if(axis instanceof EStructuralFeatureAxis) {
+ return ((EStructuralFeatureAxis)axis).getElement().getName();
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager#canDestroyAxisElement(org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis)
+ *
+ * @param axis
+ * @return
+ */
+ public boolean canDestroyAxisElement(final IAxis axis) {
+ final EObject object = (EObject)axis.getElement();
+ return !EMFHelper.isReadOnly(object);
+ }
+
+ public boolean canDestroyAxisElement(Integer axisPosition) {
+ return false;
+ }
+
+ public Command getDestroyAxisElementCommand(EditingDomain domain, Integer axisPosition) {
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java
new file mode 100644
index 00000000000..94c51a5d1dc
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java
@@ -0,0 +1,162 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.nattable.manager.cell;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.utils.EMFStringValueConverter;
+import org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+
+/**
+ * Cell Manager which allows to get the value of an {@link EStructuralFeature} for an {@link EObject}
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class EMFFeatureValueCellManager extends AbstractCellManager {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager#handles(java.lang.Object, java.lang.Object)
+ *
+ * @param obj1
+ * @param obj2
+ * @return
+ */
+ public boolean handles(final Object obj1, final Object obj2) {
+ return organizeObject(obj1, obj2).size() == 2;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager#getValue(java.lang.Object, java.lang.Object)
+ *
+ * @param obj1
+ * @param obj2
+ * @return
+ */
+ public Object getValue(final Object obj1, final Object obj2) {
+ final List<EObject> objects = organizeObject(obj1, obj2);
+ final EObject eobject = objects.get(0);
+ final EStructuralFeature feature = (EStructuralFeature)objects.get(1);
+ if(eobject.eClass().getEAllStructuralFeatures().contains(feature)) {
+ return eobject.eGet(feature);
+ }
+ return NOT_AVALAIBLE;
+ }
+
+ /**
+ *
+ * @param obj1
+ * @param obj2
+ * @return
+ */
+ protected List<EObject> organizeObject(Object obj1, Object obj2) {
+ if(obj1 instanceof IAxis) {
+ obj1 = ((IAxis)obj1).getElement();
+ }
+ if(obj2 instanceof IAxis) {
+ obj2 = ((IAxis)obj2).getElement();
+ }
+ final List<EObject> objects = new ArrayList<EObject>();
+ if(obj1 instanceof EObject && obj2 instanceof EStructuralFeature) {
+ objects.add((EObject)obj1);
+ objects.add((EObject)obj2);
+ } else if(obj1 instanceof EStructuralFeature && obj2 instanceof EObject) {
+ objects.add((EObject)obj2);
+ objects.add((EObject)obj1);
+ }
+ return objects;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager#isCellEditable(java.lang.Object, java.lang.Object)
+ *
+ * @param obj1
+ * @param obj2
+ * @return
+ */
+ public boolean isCellEditable(Object obj1, Object obj2) {
+ final List<EObject> objects = organizeObject(obj1, obj2);
+ if(objects.size() == 2) {
+ final EObject object = objects.get(0);
+ final EStructuralFeature feature = (EStructuralFeature)objects.get(1);
+ //FIXME : we must manage the derived, the read-only, the changeable, ...
+ if(object.eClass().getEAllStructuralFeatures().contains(feature)) {
+ // if(!feature.isChangeable()){
+ // return false;
+ // }
+ if(!feature.isDerived()) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager#getSetValueCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * java.lang.Object, java.lang.Object, java.lang.Object)
+ *
+ * @param domain
+ * @param rowElement
+ * @param lineElement
+ * @param newValue
+ * @return
+ */
+ public Command getSetValueCommand(EditingDomain domain, Object rowElement, Object lineElement, Object newValue) {
+ final List<EObject> objects = organizeObject(rowElement, lineElement);
+ final AbstractEditCommandRequest request = new SetRequest((TransactionalEditingDomain)domain, objects.get(0), (EStructuralFeature)objects.get(1), newValue);
+ final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(objects.get(0));
+ return new GMFtoEMFCommandWrapper(provider.getEditCommand(request));
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager#handlesAxisElement(java.lang.Object)
+ *
+ * @param obj
+ * @return
+ */
+ public boolean handlesAxisElement(Object obj) {
+ return obj instanceof EStructuralFeature || obj instanceof EStructuralFeatureAxis;
+ }
+
+ @Override
+ public ICommand getSetStringValueCommand(EditingDomain domain,final Table table, EObject tableContext, Object obj1, Object obj2, String newValue, EMFStringValueConverter valueSolver) {
+ return null;
+ }
+
+
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/messages/Messages.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/messages/Messages.java
new file mode 100644
index 00000000000..6a5f3127c7e
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/messages/Messages.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.nattable.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.emf.nattable.messages.messages"; //$NON-NLS-1$
+
+ public static String EMFFeatureCellEditorFactory_SeveralCellEditorAreDeclaredWithTheSameId;
+
+ public static String EMFFeatureCellEditorFactory_TheCellEditorProvidesANullCellId;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/messages/messages.properties b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/messages/messages.properties
new file mode 100644
index 00000000000..ae225fa44d5
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/messages/messages.properties
@@ -0,0 +1,2 @@
+EMFFeatureCellEditorFactory_SeveralCellEditorAreDeclaredWithTheSameId=Several Cell Editor configuration are declared with the same id {0}
+EMFFeatureCellEditorFactory_TheCellEditorProvidesANullCellId=The cell editor configuration {0} provides a null cellId
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFEObjectHeaderLabelProvider.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFEObjectHeaderLabelProvider.java
new file mode 100644
index 00000000000..e9ac239eaff
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFEObjectHeaderLabelProvider.java
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.nattable.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ObjectLabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider;
+import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderContextElementWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * The label provider used for header when they represents an {@link EObject} and NOT an {@link EStructuralFeature}
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class EMFEObjectHeaderLabelProvider extends AbstractNattableCellLabelProvider {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#accept(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public boolean accept(Object element) {
+ if(element instanceof ILabelProviderContextElementWrapper) {
+ Object object = ((ILabelProviderContextElementWrapper)element).getObject();
+ if(object instanceof IAxis) {
+ object = ((IAxis)object).getElement();
+ }
+ return object instanceof EObject && !(object instanceof EStructuralFeature);
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getText(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public String getText(Object element) {
+ ILabelProviderContextElementWrapper context = (ILabelProviderContextElementWrapper)element;
+ EObject object = (EObject)((ILabelProviderContextElementWrapper)element).getObject();
+ if(object instanceof EObjectAxis) {
+ object = ((EObjectAxis)object).getElement();
+ }
+ final IConfigRegistry configRegistry = context.getConfigRegistry();
+ final LabelProviderService serv = getLabelProviderService(configRegistry);
+ ILabelProviderConfiguration conf = null;
+ if(element instanceof LabelProviderCellContextElementWrapper) {
+ conf = getLabelConfiguration((LabelProviderCellContextElementWrapper)element);
+ }
+ if(conf instanceof ObjectLabelProviderConfiguration && !((ObjectLabelProviderConfiguration)conf).isDisplayLabel()) {
+ return "";
+ }
+ return serv.getLabelProvider(object).getText(object);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getImage(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public Image getImage(Object element) {
+ EObject object = (EObject)((ILabelProviderContextElementWrapper)element).getObject();
+ if(object instanceof EObjectAxis) {
+ object = ((EObjectAxis)object).getElement();
+ }
+ final IConfigRegistry configRegistry = ((ILabelProviderContextElementWrapper)element).getConfigRegistry();
+ final LabelProviderService serv = getLabelProviderService(configRegistry);
+ ILabelProviderConfiguration conf = null;
+ if(element instanceof LabelProviderCellContextElementWrapper) {
+ conf = getLabelConfiguration((LabelProviderCellContextElementWrapper)element);
+ }
+ if(conf instanceof ObjectLabelProviderConfiguration && !((ObjectLabelProviderConfiguration)conf).isDisplayIcon()) {
+ return null;
+ }
+ return serv.getLabelProvider(object).getImage(object);
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFFeatureHeaderLabelProvider.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFFeatureHeaderLabelProvider.java
new file mode 100644
index 00000000000..b9310752f39
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFFeatureHeaderLabelProvider.java
@@ -0,0 +1,234 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.nattable.provider;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
+import org.eclipse.papyrus.infra.emf.nattable.registry.EStructuralFeatureImageRegistry;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.FeatureLabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ObjectLabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderContextElementWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * Provides the label for the EstructuralFeature
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class EMFFeatureHeaderLabelProvider extends EMFEObjectHeaderLabelProvider {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#accept(java.lang.Object)
+ *
+ * @param element
+ * @return
+ * <code>true</code> if we are looking for the label of an EStructuralFeature
+ */
+ @Override
+ public boolean accept(Object element) {
+ if(element instanceof ILabelProviderContextElementWrapper) {
+ final Object object = ((ILabelProviderContextElementWrapper)element).getObject();
+ return object instanceof EStructuralFeature || object instanceof EStructuralFeatureAxis;
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @param featureConf
+ * the configuration to use to know what display in the label
+ * @param configRegistry
+ * the configRegistry
+ * @param name
+ * the name of the feature
+ * @param type
+ * the type of the feature
+ * @param isDerived
+ * <code>true</code> if the feature is derived
+ * @param lowerBound
+ * the lower bound of the feature
+ * @param upperBounds
+ * the upper bound of the feature
+ * @return
+ * the text to display for the feature according to these informations and the preferences of the user
+ */
+ protected String getText(FeatureLabelProviderConfiguration featureConf, final IConfigRegistry configRegistry, final String name, final Object type, final boolean isDerived, final int lowerBound, final int upperBounds) {
+ //we collect the required values
+ boolean displayName = featureConf.isDisplayName();
+ boolean displayMultiplicity = featureConf.isDisplayMultiplicity();
+ boolean displayType = featureConf.isDisplayType();
+ boolean displayIsDerived = featureConf.isDisplayIsDerived();
+
+ String displayedText = ""; //$NON-NLS-1$
+ if(isDerived && displayIsDerived) {
+ displayedText += "/"; //$NON-NLS-1$
+ }
+ if(displayName) {
+ displayedText += name;
+ }
+ if(displayType) {
+ if(displayName) {
+ displayedText += " : "; //$NON-NLS-1$
+ }
+ displayedText += getTypeName(configRegistry, type);
+ }
+ if(displayMultiplicity) {
+ displayedText += " ["; //$NON-NLS-1$
+ if(upperBounds == -1 && lowerBound <= 1) {
+ displayedText += "*"; //$NON-NLS-1$
+ } else if(lowerBound == upperBounds) {
+ displayedText += Integer.toString(lowerBound);
+ } else {
+ displayedText += Integer.toString(lowerBound);
+ displayedText += ".."; //$NON-NLS-1$
+ if(upperBounds == -1) {
+ displayedText += "*"; //$NON-NLS-1$
+ } else {
+ displayedText += Integer.toString(upperBounds);
+ }
+ }
+ displayedText += "]"; //$NON-NLS-1$
+ }
+
+ return displayedText;
+ }
+
+ /**
+ *
+ * @param configRegistry
+ * the configRegistry
+ * @param type
+ * the type of the feature
+ * @return
+ * the name to display for the type
+ */
+ protected String getTypeName(final IConfigRegistry configRegistry, final Object type) {
+ final LabelProviderService serv = getLabelProviderService(configRegistry);
+ if(type instanceof EClassifier) {
+ return ((EClassifier)type).getName();
+ } else {
+ return serv.getLabelProvider(type).getText(type);
+ }
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getText(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public String getText(Object element) {
+ final Object object = ((ILabelProviderContextElementWrapper)element).getObject();
+ EStructuralFeature feature = null;
+ String alias = "";
+ if(object instanceof EStructuralFeatureAxis) {
+ feature = ((EStructuralFeatureAxis)object).getElement();
+ alias = ((EStructuralFeatureAxis)object).getAlias();
+ } else if(feature instanceof EStructuralFeature) {
+ feature = (EStructuralFeature)((ILabelProviderContextElementWrapper)element).getObject();
+ }
+
+ final IConfigRegistry configRegistry = ((ILabelProviderContextElementWrapper)element).getConfigRegistry();
+ ILabelProviderConfiguration conf = null;
+ if(element instanceof LabelProviderCellContextElementWrapper) {
+ conf = getLabelConfiguration((LabelProviderCellContextElementWrapper)element);
+ }
+ if(conf instanceof ObjectLabelProviderConfiguration && !((ObjectLabelProviderConfiguration)conf).isDisplayLabel()) {
+ return ""; //$NON-NLS-1$
+ }
+ if(conf instanceof FeatureLabelProviderConfiguration) {
+ String nameToDisplay = feature.getName();
+ if(alias != null && !alias.equals("")) {
+ nameToDisplay = alias;
+ }
+ return getText((FeatureLabelProviderConfiguration)conf, configRegistry, nameToDisplay, feature.getEType(), feature.isDerived(), feature.getLowerBound(), feature.getUpperBound());
+ } else {
+ return super.getText(element);
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getImage(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public Image getImage(Object element) {
+ ILabelProviderConfiguration conf = null;
+ if(element instanceof LabelProviderCellContextElementWrapper) {
+ conf = getLabelConfiguration((LabelProviderCellContextElementWrapper)element);
+ }
+ if(conf instanceof ObjectLabelProviderConfiguration && !((ObjectLabelProviderConfiguration)conf).isDisplayIcon()) {
+ return null;
+ }
+
+ final Object object = ((ILabelProviderContextElementWrapper)element).getObject();
+ EStructuralFeature feature = null;
+ if(object instanceof EStructuralFeatureAxis) {
+ feature = ((EStructuralFeatureAxis)object).getElement();
+ } else if(object instanceof EStructuralFeature) {
+ feature = (EStructuralFeature)((ILabelProviderContextElementWrapper)element).getObject();
+ }
+ if(feature instanceof EAttribute) {
+ return EStructuralFeatureImageRegistry.getAttributeIcon();
+
+ } else if(feature instanceof EReference) {
+ return getEReferenceImage((EReference)feature);
+ }
+ return super.getImage(feature);
+ }
+
+
+ /**
+ *
+ * @param reference
+ * an EReference
+ * @return
+ * the image for this reference
+ */
+ public static Image getEReferenceImage(final EReference reference) {
+ final EReference opposite = reference.getEOpposite();
+
+ if(reference.isContainment()) {
+ if(opposite == null) {
+ return EStructuralFeatureImageRegistry.getUnidirectionalAggregIcon();
+ }
+ return EStructuralFeatureImageRegistry.getAggregIcon();
+ }
+
+ if(opposite != null && opposite.isContainment()) {
+ return EStructuralFeatureImageRegistry.getInvAggregIcon();
+ }
+
+ if(opposite == null) {
+ return EStructuralFeatureImageRegistry.getUnidirectionalLinkIcon();
+ }
+ return EStructuralFeatureImageRegistry.getLinkIcon();
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/registry/EStructuralFeatureImageRegistry.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/registry/EStructuralFeatureImageRegistry.java
new file mode 100644
index 00000000000..e139d41d7d7
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/registry/EStructuralFeatureImageRegistry.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.nattable.registry;
+
+import org.eclipse.papyrus.infra.widgets.Activator;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * Image registry to use for EStructuralFeature
+ */
+public class EStructuralFeatureImageRegistry {
+
+ /** paths for emf feature icons */
+ private static final String LINK_ICON_PATH = "/icons/link.gif"; //$NON-NLS-1$
+
+ private static final String LINK_UNIDIR_ICON_PATH = "/icons/link_unidir.gif"; //$NON-NLS-1$
+
+ private static final String AGGREG_ICON_PATH = "/icons/aggreg.gif"; //$NON-NLS-1$
+
+ private static final String AGGREG_UNIDIR_ICON_PATH = "/icons/aggreg_unidir.gif"; //$NON-NLS-1$
+
+ private static final String INV_AGGREG_ICON_PATH = "/icons/inv_aggreg.gif"; //$NON-NLS-1$
+
+ private static final String ATTRIBUTE_ICON_PATH = "/icons/attributes.gif"; //$NON-NLS-1$
+
+
+ /**
+ *
+ * @param path
+ * a path
+ * @return
+ * the image loaded from this path
+ */
+ private static final Image getImage(final String path) {
+ return Activator.getDefault().getImage(org.eclipse.papyrus.infra.emf.nattable.Activator.PLUGIN_ID, path);
+ }
+
+ /**
+ *
+ * @return
+ * the icon for link
+ */
+ public static Image getLinkIcon() {
+ return EStructuralFeatureImageRegistry.getImage(LINK_ICON_PATH);
+ }
+
+ /**
+ *
+ * @return
+ * the icon for unidirectional link
+ */
+ public static Image getUnidirectionalLinkIcon() {
+ return EStructuralFeatureImageRegistry.getImage(LINK_UNIDIR_ICON_PATH);
+ }
+
+ /**
+ *
+ * @return
+ * the icon for aggregation
+ */
+ public static Image getInvAggregIcon() {
+ return EStructuralFeatureImageRegistry.getImage(INV_AGGREG_ICON_PATH);
+ }
+
+ /**
+ *
+ * @return
+ * the icon for aggregation
+ */
+ public static Image getAggregIcon() {
+ return EStructuralFeatureImageRegistry.getImage(AGGREG_ICON_PATH);
+ }
+
+ /**
+ *
+ * @return
+ * the icon for unidirectional aggregation
+ */
+ public static Image getUnidirectionalAggregIcon() {
+ return EStructuralFeatureImageRegistry.getImage(AGGREG_UNIDIR_ICON_PATH);
+ }
+
+ /**
+ *
+ * @return
+ * the attribute icon
+ */
+ public static Image getAttributeIcon() {
+ return EStructuralFeatureImageRegistry.getImage(ATTRIBUTE_ICON_PATH);
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/validator/IntegerDataValidator.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/validator/IntegerDataValidator.java
new file mode 100644
index 00000000000..2ce0cb3d417
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/validator/IntegerDataValidator.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.nattable.validator;
+
+import org.eclipse.nebula.widgets.nattable.data.validate.DataValidator;
+
+/**
+ *
+ * The Validator for Integer
+ *
+ */
+public class IntegerDataValidator extends DataValidator {
+
+ /**
+ *
+ * @see org.eclipse.nebula.widgets.nattable.data.validate.DataValidator#validate(int, int, java.lang.Object)
+ *
+ * @param columnIndex
+ * @param rowIndex
+ * @param newValue
+ * @return
+ */
+ @Override
+ public boolean validate(int columnIndex, int rowIndex, Object newValue) {
+ try {
+ if(newValue != null) {
+ new Integer(newValue.toString());
+ }
+ } catch (Exception e) {
+ return false;
+ }
+ return true;
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/.classpath b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/.project b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/.project
new file mode 100644
index 00000000000..2e261c7b71c
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.emf</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/.settings/org.eclipse.jdt.core.prefs b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..5a8be5f6faa
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu Dec 08 10:09:13 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..b61856493e4
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF
@@ -0,0 +1,47 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;bundle-version="2.7.0",
+ org.eclipse.emf.edit;bundle-version="2.7.1",
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.widgets;bundle-version="0.10.1",
+ org.eclipse.emf.edit.ui;bundle-version="2.8.0",
+ org.eclipse.core.databinding;bundle-version="1.4.1",
+ org.eclipse.core.databinding.property;bundle-version="1.4.0",
+ org.eclipse.emf.databinding;bundle-version="1.2.0",
+ org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.2.0",
+ org.eclipse.emf.facet.infra.facet;bundle-version="0.2.0",
+ org.eclipse.emf.facet.infra.browser.custom;bundle-version="0.2.0",
+ org.eclipse.emf.facet.infra.facet.core;bundle-version="0.2.0",
+ org.eclipse.emf.facet.infra.browser.custom.core;bundle-version="0.2.0",
+ org.eclipse.papyrus.infra.tools;bundle-version="0.10.1",
+ org.eclipse.emf.transaction;bundle-version="1.4.0",
+ org.eclipse.emf.ecore.xmi,
+ org.eclipse.emf.facet.custom.metamodel;bundle-version="0.2.0",
+ org.eclipse.emf.facet.custom.ui;bundle-version="0.2.0",
+ org.eclipse.emf.facet.util.emf.core,
+ com.ibm.icu;bundle-version="4.4.2",
+ org.eclipse.papyrus.infra.core;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="0.10.1",
+ org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
+ org.eclipse.core.expressions;bundle-version="3.4.400",
+ org.eclipse.gmf.runtime.common.core;bundle-version="1.7.0",
+ org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.4.0",
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.7.0",
+ com.google.guava;bundle-version="10.0.1"
+Export-Package: org.eclipse.papyrus.infra.emf,
+ org.eclipse.papyrus.infra.emf.commands,
+ org.eclipse.papyrus.infra.emf.databinding,
+ org.eclipse.papyrus.infra.emf.dialog,
+ org.eclipse.papyrus.infra.emf.providers,
+ org.eclipse.papyrus.infra.emf.providers.strategy,
+ org.eclipse.papyrus.infra.emf.utils
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.10.1.qualifier
+Bundle-Name: EMF Tools (Incubation)
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.emf.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.infra.emf;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/about.html b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/about.html
new file mode 100644
index 00000000000..209103075a7
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 14, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/build.properties b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/build.properties
new file mode 100644
index 00000000000..2eb0111b369
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ build.properties,\
+ plugin.pdoc,\
+ plugin.xml
+src.includes = about.html
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/plugin.pdoc b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/plugin.pdoc
new file mode 100644
index 00000000000..0d8bd6f33cd
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/plugin.pdoc
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin provides some classes with dependencies on EMF">
+ <referent firstName="Camille" lastName="Letavernier" eMail="camille.letavernier@cea.fr" currentCompany="CEA-LIST"/>
+ <referent firstName="vincent" lastName="lorenzo" eMail="vincent.lorenzo@cea.fr" currentCompany="CEA-LIST"/>
+</doc:Documentation>
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/plugin.xml b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/plugin.xml
new file mode 100644
index 00000000000..a5a77a29959
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/plugin.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.core.service">
+ <service
+ classname="org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceInitializerService"
+ description="Service used to initialize association between ResourceSet and ServiceRegistry"
+ id="org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceInitializerService"
+ priority="1"
+ startKind="startup">
+ <dependsOn
+ serviceKeyRef="org.eclipse.papyrus.infra.core.resource.ModelSet">
+ </dependsOn>
+ </service>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.services.labelprovider.labelProvider">
+ <labelProvider
+ priority="100"
+ provider="org.eclipse.papyrus.infra.emf.providers.EMFFilteredLabelProvider">
+ </labelProvider>
+ <labelProvider
+ priority="50"
+ provider="org.eclipse.papyrus.infra.emf.providers.AnyTypeLabelProvider">
+ </labelProvider>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
+ <metamodel
+ nsURI="http://www.eclipse.org/emf/2002/Ecore">
+ <adviceBinding
+ class="org.eclipse.papyrus.infra.emf.advice.DeletePageAdvice"
+ id="org.eclipse.papyrus.infra.emf.deletePageAdvice"
+ inheritance="none"
+ typeId="*">
+ </adviceBinding>
+ <metamodelType
+ eclass="EObject"
+ edithelper="org.eclipse.papyrus.infra.emf.advice.DeletePageEditHelper"
+ id="org.eclipse.papyrus.infra.emf.page">
+ </metamodelType>
+ </metamodel>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
+ <binding
+ context="org.eclipse.papyrus.infra.services.edit.TypeContext">
+ <elementType
+ ref="org.eclipse.papyrus.infra.emf.page">
+ </elementType>
+ </binding>
+ <binding
+ context="org.eclipse.gmf.runtime.emf.type.core.defaultContext">
+ <elementType
+ ref="org.eclipse.papyrus.infra.emf.deletePageAdvice">
+ </elementType>
+ </binding>
+ </extension>
+
+</plugin>
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/Activator.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/Activator.java
new file mode 100644
index 00000000000..bb975328e95
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/Activator.java
@@ -0,0 +1,297 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (camille.letavernier@cea.fr) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.facet.infra.browser.custom.MetamodelView;
+import org.eclipse.emf.facet.infra.browser.custom.TypeView;
+import org.eclipse.emf.facet.infra.browser.custom.core.CustomizationsCatalog;
+import org.eclipse.emf.facet.infra.browser.uicore.CustomizationManager;
+import org.eclipse.emf.facet.infra.facet.Facet;
+import org.eclipse.emf.facet.infra.facet.FacetSet;
+import org.eclipse.emf.facet.infra.facet.core.FacetSetCatalog;
+import org.eclipse.jface.dialogs.DialogSettings;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.emf"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The plug-in's logger
+ */
+ public static LogHelper log;
+
+ private CustomizationManager fCustomizationManager;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(final BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(final BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /**
+ *
+ * @return the customization manager in charge to adapt element in modisco
+ */
+ public CustomizationManager getCustomizationManager() {
+ if(this.fCustomizationManager == null) {
+ this.fCustomizationManager = new CustomizationManager();
+ init(this.fCustomizationManager);
+ }
+ return this.fCustomizationManager;
+ }
+
+ /**
+ * Saves the current Customization Manager settings to the preferences
+ */
+ public void saveCustomizationManagerState() {
+ IDialogSettings dialogSettings = getBrowserCustomizationDialogSettings();
+
+ List<MetamodelView> appliedCustomizations = getCustomizationManager().getRegisteredCustomizations();
+
+ for(MetamodelView customization : CustomizationsCatalog.getInstance().getRegistryCustomizations()) {
+
+ boolean isApplied = appliedCustomizations.contains(customization);
+ String settingKey = getSettingKey(customization);
+
+ dialogSettings.put(settingKey, isApplied);
+ }
+ }
+
+ private String getSettingKey(MetamodelView customization) {
+ return customization.getLocation();
+ }
+
+ protected IDialogSettings getBrowserCustomizationDialogSettings() {
+ String sectionId = CUSTOMIZATION_MANAGER_SECTION;
+
+ IDialogSettings settings = Activator.getDefault().getDialogSettings().getSection(sectionId);
+ if(settings == null) {
+ settings = Activator.getDefault().getDialogSettings().addNewSection(sectionId);
+ }
+ return settings;
+ }
+
+ private void init(final CustomizationManager customizationManager) {
+ // the appearance can be customized here:
+
+ customizationManager.setShowDerivedLinks(true);
+ //to hide the blue arrow overlay
+ customizationManager.setDecorateExternalResources(false);
+
+ IDialogSettings settings = getBrowserCustomizationDialogSettings();
+
+ try {
+
+ // load customizations defined as default through the customization
+ // extension
+ List<MetamodelView> registryDefaultCustomizations = CustomizationsCatalog.getInstance().getRegistryDefaultCustomizations();
+ List<MetamodelView> registryAllCustomizations = CustomizationsCatalog.getInstance().getRegistryCustomizations();
+
+ List<MetamodelView> appliedCustomizations = new LinkedList<MetamodelView>();
+
+ for(MetamodelView customization : registryAllCustomizations) {
+ String settingKey = getSettingKey(customization);
+
+ boolean isActive = false;
+ if(settings.get(settingKey) == null) { //Never customized
+ isActive = registryDefaultCustomizations.contains(customization); //Loaded by default
+ } else {
+ isActive = settings.getBoolean(settingKey);
+ }
+
+ if(isActive) {
+ customizationManager.registerCustomization(customization);
+ appliedCustomizations.add(customization);
+ }
+ }
+
+ customizationManager.loadCustomizations();
+ loadFacetsForCustomizations(appliedCustomizations, customizationManager);
+
+ } catch (Throwable e) {
+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Error initializing customizations", e)); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * The section name of the Dialog Settings for storing Customization Manager settings
+ */
+ public static final String CUSTOMIZATION_MANAGER_SECTION = PLUGIN_ID + ".customizationManager";//$NON-NLS-1$
+
+ /**
+ * Restores the default Customization Manager configuration
+ */
+ public void restoreDefaultCustomizationManager() {
+ CustomizationManager manager = getCustomizationManager();
+
+ DialogSettings settings = (DialogSettings)getDialogSettings();
+ settings.removeSection(CUSTOMIZATION_MANAGER_SECTION);
+
+ List<MetamodelView> registryDefaultCustomizations = CustomizationsCatalog.getInstance().getRegistryDefaultCustomizations();
+
+ manager.clearCustomizations();
+ for(MetamodelView customization : registryDefaultCustomizations) {
+ manager.registerCustomization(customization);
+ }
+ manager.loadCustomizations();
+ }
+
+ /**
+ * load the facets
+ *
+ * @param customizations
+ * list of customization
+ * @param customizationManager
+ * the Customization Manager
+ */
+ protected void loadFacetsForCustomizations(final List<MetamodelView> customizations, final CustomizationManager customizationManager) {
+ final Set<Facet> referencedFacets = new HashSet<Facet>();
+ final Collection<FacetSet> facetSets = FacetSetCatalog.getSingleton().getAllFacetSets();
+
+ for(MetamodelView customization : customizations) {
+ String metamodelURI = customization.getMetamodelURI();
+ // find customized FacetSet
+ FacetSet customizedFacetSet = null;
+ if(metamodelURI != null) {
+ for(FacetSet facetSet : facetSets) {
+ if(metamodelURI.equals(facetSet.getNsURI())) {
+ customizedFacetSet = facetSet;
+ break;
+ }
+ }
+ }
+ if(customizedFacetSet == null) {
+ continue;
+ }
+
+ // find customized Facets
+ EList<TypeView> types = customization.getTypes();
+ for(TypeView typeView : types) {
+ String metaclassName = typeView.getMetaclassName();
+ Facet facet = findFacetWithFullyQualifiedName(metaclassName, customizedFacetSet);
+ if(facet != null) {
+ referencedFacets.add(facet);
+ } else {
+ Activator.log.warn(String.format("Missing required facet \"%s\" in FacetSet \"%s\" for customization \"%s\"", metaclassName, customizedFacetSet.getName(), customization.getName()));
+ }
+ }
+
+ for(Facet referencedFacet : referencedFacets) {
+ customizationManager.loadFacet(referencedFacet);
+ }
+ }
+
+ //
+ // for modified facets
+ // customizationManager.getInstancesForMetaclasses().buildDerivationTree();
+ // customizationManager.getAppearanceConfiguration().touch();
+ // customizationManager.refreshDelayed(true);
+ }
+
+ /**
+ * fin a facet from
+ *
+ * @param metaclassName
+ * @param customizedFacetSet
+ * @return
+ */
+ private Facet findFacetWithFullyQualifiedName(final String metaclassName, final FacetSet customizedFacetSet) {
+ EList<Facet> facets = customizedFacetSet.getFacets();
+ for(Facet facet : facets) {
+ String facetName = getMetaclassQualifiedName(facet);
+ if(metaclassName.equals(facetName)) {
+ return facet;
+ }
+ }
+ return null;
+ }
+
+ /** @return the qualified name of the given metaclass */
+ public static String getMetaclassQualifiedName(final EClassifier eClass) {
+ final ArrayList<String> qualifiedNameParts = new ArrayList<String>();
+ final StringBuilder builder = new StringBuilder();
+
+ EPackage ePackage = eClass.getEPackage();
+ while(ePackage != null) {
+ qualifiedNameParts.add(ePackage.getName());
+ ePackage = ePackage.getESuperPackage();
+ }
+
+ for(int i = qualifiedNameParts.size() - 1; i >= 0; i--) {
+ builder.append(qualifiedNameParts.get(i) + "."); //$NON-NLS-1$
+ }
+
+ builder.append(eClass.getName());
+
+ return builder.toString();
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/advice/DeletePageAdvice.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/advice/DeletePageAdvice.java
new file mode 100644
index 00000000000..21894ef9909
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/advice/DeletePageAdvice.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.advice;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+
+/**
+ * An EditHelperAdvice which applies to all Papyrus page identifiers (i.e. Tables, Diagrams, ...)
+ * When a page identifier object is deleted, the associated page is removed
+ *
+ * This advice is used when an Object containing a page is deleted
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class DeletePageAdvice extends AbstractEditHelperAdvice {
+
+ @Override
+ public ICommand getBeforeDestroyElementCommand(DestroyElementRequest request) {
+ final EObject objectToDestroy = request.getElementToDestroy();
+ if(objectToDestroy == null) {
+ return null;
+ }
+
+ return RemovePageHelper.getRemovePageCommand(request.getEditingDomain(), objectToDestroy);
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/advice/DeletePageEditHelper.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/advice/DeletePageEditHelper.java
new file mode 100644
index 00000000000..8819b05bcab
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/advice/DeletePageEditHelper.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.advice;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+
+/**
+ * An EditHelper which applies to all Papyrus page identifiers (i.e. Tables, Diagrams, ...)
+ * When a page identifier object is deleted, the associated page is removed
+ *
+ * This EditHelper will be called when a Page is deleted
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class DeletePageEditHelper extends AbstractEditHelper {
+
+ @Override
+ protected ICommand getDestroyElementCommand(DestroyElementRequest req) {
+ ICommand baseCommand = super.getDestroyElementCommand(req);
+
+ final EObject elementToDestroy = req.getElementToDestroy();
+
+ ICommand removePage = RemovePageHelper.getRemovePageCommand(req.getEditingDomain(), elementToDestroy);
+
+ baseCommand = CompositeCommand.compose(removePage, baseCommand);
+
+ return baseCommand;
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/advice/RemovePageHelper.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/advice/RemovePageHelper.java
new file mode 100644
index 00000000000..2f55fda2fea
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/advice/RemovePageHelper.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.advice;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+
+/**
+ * A Helper to build the command used to remove the page associated to the destroyed element
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class RemovePageHelper {
+
+ public static ICommand getRemovePageCommand(final TransactionalEditingDomain editingDomain, final EObject elementToDestroy) {
+ try {
+ final IPageManager pageManager = ServiceUtilsForEObject.getInstance().getIPageManager(elementToDestroy);
+ if(pageManager.allPages().contains(elementToDestroy)) {
+ return new AbstractTransactionalCommand(editingDomain, "Delete page", null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ pageManager.removePage(elementToDestroy);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ }
+ } catch (ServiceException ex) {
+ //Ignore
+ } catch (Exception ex) {
+ //Ignore
+ }
+
+ return null;
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/AddToResourceCommand.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/AddToResourceCommand.java
new file mode 100644
index 00000000000..52ee15b938a
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/AddToResourceCommand.java
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.commands;
+
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ *
+ * This command allows to add an EObject to a resource
+ *
+ */
+public class AddToResourceCommand extends AbstractCommand {
+
+ /**
+ * the resource
+ */
+ private final Resource resource;
+
+ /**
+ * the object to add to the resource
+ */
+ private final EObject toAdd;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param resource
+ * the resource
+ * @param toAdd
+ * the objectto add to the resource
+ */
+ public AddToResourceCommand(final Resource resource, final EObject toAdd) {
+ this.resource = resource;
+ this.toAdd = toAdd;
+ setLabel("Add an object to a resource");
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.common.command.Command#execute()
+ *
+ */
+ public void execute() {
+ this.resource.getContents().add(this.toAdd);
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.common.command.Command#redo()
+ *
+ */
+ public void redo() {
+ execute();
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.common.command.AbstractCommand#prepare()
+ *
+ */
+ @Override
+ protected boolean prepare() {
+ return true;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.emf.common.command.AbstractCommand#undo()
+ *
+ */
+ @Override
+ public void undo() {
+ this.resource.getContents().remove(this.toAdd);
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.common.command.AbstractCommand#canExecute()
+ *
+ */
+ @Override
+ public boolean canExecute() {
+ return super.canExecute() && this.resource != null;
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/CreateEAnnotationCommand.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/CreateEAnnotationCommand.java
new file mode 100644
index 00000000000..c253c04e724
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/CreateEAnnotationCommand.java
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ * Copyright (c) 2008 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.commands;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+public class CreateEAnnotationCommand extends org.eclipse.emf.transaction.RecordingCommand {
+
+ public EModelElement getObject() {
+ return object;
+ }
+
+ // @unused
+ public void setObject(EModelElement object) {
+ this.object = object;
+ }
+
+ // @unused
+ public String getEAnnotationName() {
+ return eAnnotationName;
+ }
+
+ // @unused
+ public void setEAnnotationName(String annotationName) {
+ eAnnotationName = annotationName;
+ }
+
+ /** The object. */
+ private EModelElement object;
+
+ /** The e annotation name. */
+ private String eAnnotationName;
+
+ /**
+ * Instantiates a new creates the e annotation command.
+ *
+ * @param domain
+ * the domain
+ * @param object
+ * the object
+ * @param eannotationName
+ * the eannotation name
+ */
+ public CreateEAnnotationCommand(TransactionalEditingDomain domain, EModelElement object, String eannotationName) {
+ super(domain);
+ this.object = object;
+ this.eAnnotationName = eannotationName;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void doExecute() {
+ attachEannotation(createEAnnotation(), object);
+
+ }
+
+ /**
+ * Creates the e annotation.
+ *
+ * @return the e annotation
+ */
+ protected EAnnotation createEAnnotation() {
+ EAnnotation eannotation = EcoreFactory.eINSTANCE.createEAnnotation();
+ eannotation.setSource(eAnnotationName);
+ return eannotation;
+ }
+
+ /**
+ * Attach eannotation to an EmodelElement.
+ *
+ * @param annotation
+ * the annotation
+ * @param object
+ * the object
+ */
+ protected void attachEannotation(EAnnotation annotation, EModelElement object) {
+ object.getEAnnotations().add(annotation);
+ }
+
+ /**
+ * Replace existing eannotation with a new eannotation. This repplaced eannotation has the same
+ * source.
+ *
+ * @param annotation
+ * the annotation
+ * @param object
+ * the object
+ */
+ protected void replaceEannotation(EAnnotation annotation, EModelElement object) {
+ while(object.getEAnnotation(annotation.getSource()) != null) {
+ object.getEAnnotations().remove(object.getEAnnotation(annotation.getSource()));
+ }
+
+ object.getEAnnotations().add(annotation);
+ }
+
+ /**
+ * Adds the entry.
+ *
+ * @param annotation
+ * the annotation
+ * @param key
+ * the key
+ * @param value
+ * the value
+ */
+ // @unused
+ protected void addEntry(EAnnotation annotation, String key, String value) {
+ annotation.getDetails().put(key, value);
+ }
+
+ /**
+ * Replace entry.
+ *
+ * @param annotation
+ * the annotation not null
+ * @param key
+ * the key
+ * @param value
+ * the value
+ */
+ protected void replaceEntry(EAnnotation annotation, String key, String value) {
+ while(annotation.getDetails().get(key) != null) {
+ annotation.getDetails().removeKey(key);
+
+ }
+ annotation.getDetails().put(key, value);
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/IPapyrusDuplicateCommandConstants.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/IPapyrusDuplicateCommandConstants.java
new file mode 100644
index 00000000000..e2a59d4646b
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/IPapyrusDuplicateCommandConstants.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.commands;
+
+
+/**
+ * Constants for the duplication commands.
+ */
+public interface IPapyrusDuplicateCommandConstants {
+
+ /** Constant used as a key for the parameters map of the duplication request */
+ public final String ADDITIONAL_DUPLICATED_ELEMENTS = "Additional_Duplicated_Elements"; //$NON-NLS-1$
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/RemoveEAnnotationCommand.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/RemoveEAnnotationCommand.java
new file mode 100644
index 00000000000..bca16f5e807
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/RemoveEAnnotationCommand.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2008 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.commands;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+/**
+ * This {@link RecordingCommand} removes an eannotation to a given element.
+ */
+public class RemoveEAnnotationCommand extends org.eclipse.emf.transaction.RecordingCommand {
+
+ // @unused
+ public EModelElement getObject() {
+ return object;
+ }
+
+ // @unused
+ public void setObject(EModelElement object) {
+ this.object = object;
+ }
+
+ // @unused
+ public String getEAnnotationName() {
+ return eAnnotationName;
+ }
+
+ // @unused
+ public void setEAnnotationName(String annotationName) {
+ eAnnotationName = annotationName;
+ }
+
+ /** The object. */
+ private EModelElement object;
+
+ /** The e annotation name. */
+ private String eAnnotationName;
+
+ /**
+ * Instantiates a new creates the e annotation command.
+ *
+ * @param domain
+ * the domain
+ * @param object
+ * the object
+ * @param eannotationName
+ * the eannotation name
+ */
+ public RemoveEAnnotationCommand(TransactionalEditingDomain domain, EModelElement object, String eannotationName) {
+ super(domain);
+ this.object = object;
+ this.eAnnotationName = eannotationName;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void doExecute() {
+ EAnnotation annotation = object.getEAnnotation(eAnnotationName);
+ object.getEAnnotations().remove(annotation);
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/RemoveFromResourcecommand.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/RemoveFromResourcecommand.java
new file mode 100644
index 00000000000..1d87e223a28
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/RemoveFromResourcecommand.java
@@ -0,0 +1,132 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.commands;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+/**
+ *
+ * This command allows to remove elements from a resource
+ *
+ */
+public class RemoveFromResourcecommand extends RecordingCommand {
+
+ /**
+ * the managed resource
+ */
+ final private Resource resource;
+
+ /**
+ * the element to remove from the resource
+ */
+ final private EObject toRemove;
+
+ /**
+ * the list of the elements to remove from the resource
+ */
+ final private Collection<EObject> elementsToRemove;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * the editing domain
+ * @param resource
+ * the resource
+ * @param toRemove
+ * the element to remove
+ */
+ public RemoveFromResourcecommand(final TransactionalEditingDomain domain, final Resource resource, final EObject toRemove) {
+ this(domain, resource, toRemove, null);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * the editing domain
+ * @param resource
+ * the resource
+ * @param elementsToRemove
+ * the list of the elements to remove
+ */
+ public RemoveFromResourcecommand(final TransactionalEditingDomain domain, final Resource resource, final Collection<EObject> elementsToRemove) {
+ this(domain, resource, null, elementsToRemove);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * the editing domain
+ * @param resource
+ * the resource
+ * @param toRemove
+ * the element to remove
+ * @param elementsToRemove
+ * the list of the elements to remove
+ */
+ protected RemoveFromResourcecommand(final TransactionalEditingDomain domain, final Resource resource, final EObject toRemove, final Collection<EObject> elementsToRemove) {
+ super(domain, "Remove an EObject from a resource");
+ this.resource = resource;
+ this.toRemove = toRemove;
+ this.elementsToRemove = elementsToRemove;
+ }
+
+ /**
+ *
+ * remove the element(s) of the resource
+ *
+ */
+ @Override
+ protected void doExecute() {
+ try {
+ if(this.toRemove != null) {
+ this.resource.getContents().remove(toRemove);
+ }
+
+ if(this.elementsToRemove != null) {
+ this.resource.getContents().removeAll(elementsToRemove);
+ }
+ } catch (Exception e) {
+ int i = 0;
+ i++;
+ }
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.emf.common.command.AbstractCommand#canExecute()
+ *
+ * @return
+ */
+ @Override
+ public boolean canExecute() {
+ boolean result = super.canExecute();
+ if(toRemove == null && elementsToRemove == null) {
+ return false;
+ }
+ return result;
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/UnsetCommand.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/UnsetCommand.java
new file mode 100644
index 00000000000..a5b70fd6c1e
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/commands/UnsetCommand.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.commands;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.emf.messages.Messages;
+
+
+public class UnsetCommand extends RecordingCommand {
+
+ /**
+ * the source eobject
+ */
+ private final EObject source;
+
+ /**
+ * the feature
+ */
+ private final EStructuralFeature feature;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * the editing domain
+ * @param source
+ * the eobject to modify
+ * @param feature
+ * the feature to unset
+ */
+ public UnsetCommand(final TransactionalEditingDomain domain, final EObject source, final EStructuralFeature feature) {
+ super(domain, Messages.UnsetCommand_UnsetCommand);
+ this.source = source;
+ this.feature = feature;
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
+ *
+ */
+ @Override
+ protected void doExecute() {
+ source.eUnset(feature);
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/AnnotationObservableValue.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/AnnotationObservableValue.java
new file mode 100644
index 00000000000..1e690d4c09a
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/AnnotationObservableValue.java
@@ -0,0 +1,306 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.databinding;
+
+import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+/**
+ * An IObservableValue for editing EMF EAnnotations
+ *
+ * @author Camille Letavernier
+ */
+public class AnnotationObservableValue extends AbstractObservableValue {
+
+ /**
+ * The EModelElement to edit.
+ */
+ protected EModelElement source;
+
+ /**
+ * The editing domain on which the commands will be executed
+ */
+ protected EditingDomain domain;
+
+ /**
+ * The name of the annotation to use
+ */
+ protected String annotationName;
+
+ /**
+ * The annotation key to edit
+ */
+ protected String key;
+
+ /**
+ * Whether the EAnnotation should be removed from the source when its last
+ * entry is removed (ie. value = null)
+ */
+ protected boolean deleteWithLastEntry;
+
+ /**
+ * Constructor.
+ *
+ * Creates an IObservableValue for the annotation. The annotation doesn't
+ * need to be created beforehand
+ *
+ * @param source
+ * The EObject owning the annotation
+ * @param domain
+ * The editing domain on which the commands will be executed
+ * @param annotationName
+ * The name of the annotation
+ * @param key
+ * The name of annotation's property to edit
+ */
+ public AnnotationObservableValue(EModelElement source, EditingDomain domain, String annotationName, String key) {
+ this(source, domain, annotationName, key, false);
+ }
+
+ /**
+ * Constructor.
+ *
+ * Creates an IObservableValue for the annotation. The annotation doesn't
+ * need to be created beforehand
+ *
+ * @param source
+ * The EObject owning the annotation
+ * @param domain
+ * The editing domain on which the commands will be executed
+ * @param annotationName
+ * The name of the annotation
+ * @param key
+ * The name of annotation's property to edit
+ * @param deleteWithLastEntry
+ * Whether the EAnnotation should be removed from the source when its
+ * last entry is removed (ie. value = null)
+ */
+ public AnnotationObservableValue(EModelElement source, EditingDomain domain, String annotationName, String key, boolean deleteWithLastEntry) {
+ this.source = source;
+ this.domain = domain;
+ this.annotationName = annotationName;
+ this.key = key;
+ this.deleteWithLastEntry = deleteWithLastEntry;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object getValueType() {
+ return String.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Object doGetValue() {
+ EAnnotation annotation = getEAnnotation();
+ if(annotation == null) {
+ return null;
+ }
+
+ return annotation.getDetails().get(key);
+ }
+
+ /**
+ * @return the observed EAnnotation
+ */
+ protected EAnnotation getEAnnotation() {
+ return source.getEAnnotation(annotationName);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void doSetValue(Object value) {
+ Command emfCommand = getCommand(value);
+ if(emfCommand != null) {
+ domain.getCommandStack().execute(emfCommand);
+ }
+ }
+
+ /**
+ * Returns the command used to edit the observed annotation, which the
+ * given value
+ *
+ * @param value
+ * @return
+ */
+ protected Command getCommand(Object value) {
+ EAnnotation annotation = getEAnnotation();
+
+ if(value == null) {
+ //No change : the key is not defined ; we cannot remove it
+ if(annotation == null || !annotation.getDetails().containsKey(key)) {
+ return null;
+ }
+ } else {
+ if(!(value instanceof String)) {
+ return null;
+ }
+ }
+
+ CompoundCommand emfCommand = new CompoundCommand("Set " + key) {
+
+ @Override
+ public boolean prepare() {
+ if(this.isEmpty()) {
+ return false;
+ }
+
+ return commandList.get(0).canExecute();
+ }
+
+ };
+
+ if(annotation == null) {
+ annotation = EcoreFactory.eINSTANCE.createEAnnotation();
+
+ SetCommand attachToSourceCommand = new SetCommand(domain, annotation, EcorePackage.eINSTANCE.getEAnnotation_EModelElement(), source);
+ attachToSourceCommand.setLabel("Attach to source");
+ emfCommand.append(attachToSourceCommand);
+
+ SetCommand nameCommand = new SetCommand(domain, annotation, EcorePackage.eINSTANCE.getEAnnotation_Source(), annotationName);
+ nameCommand.setLabel("Set name");
+ emfCommand.append(nameCommand);
+ }
+
+ if(value == null) {
+ if(annotation.getDetails().size() == 1 && annotation.getDetails().containsKey(key) && deleteWithLastEntry) {
+ //We removed the last key : delete the annotation
+ SetCommand deleteAnnotationCommand = new SetCommand(domain, annotation, EcorePackage.eINSTANCE.getEAnnotation_EModelElement(), null);
+ deleteAnnotationCommand.setLabel("Delete EAnnotation");
+ emfCommand.append(deleteAnnotationCommand);
+ } else {
+ Command removeEntryCommand = new RemoveEntryCommand(annotation, key);
+ emfCommand.append(removeEntryCommand);
+ }
+ } else {
+ Command addEntryCommand = new AddEntryCommand(annotation, key, (String)value);
+ emfCommand.append(addEntryCommand);
+ }
+
+ return emfCommand;
+ }
+
+ /**
+ * A Command to remove an entry from an EAnnotation
+ *
+ * @author Camille Letavernier
+ *
+ */
+ protected class RemoveEntryCommand extends AbstractCommand {
+
+ private EAnnotation annotation;
+
+ private String key;
+
+ private String previousValue;
+
+ private boolean undo = false;
+
+ /**
+ * Constructor
+ *
+ * @param annotation
+ * The EAnnotation to edit
+ * @param key
+ * The EAnnotation's key to edit
+ */
+ public RemoveEntryCommand(EAnnotation annotation, String key) {
+ this.annotation = annotation;
+ this.key = key;
+ }
+
+ public void execute() {
+ undo = annotation.getDetails().containsKey(key);
+ if(undo) {
+ previousValue = annotation.getDetails().get(key);
+ annotation.getDetails().remove(key);
+ }
+ }
+
+ public void redo() {
+ execute();
+ }
+
+ @Override
+ public boolean prepare() {
+ return true;
+ }
+
+ @Override
+ public void undo() {
+ if(undo) {
+ annotation.getDetails().put(key, previousValue);
+ }
+ }
+ }
+
+ /**
+ * A Command to set an EAnnotation's entry
+ *
+ * @author Camille Letavernier
+ */
+ protected class AddEntryCommand extends AbstractCommand {
+
+ private EAnnotation annotation;
+
+ private String key;
+
+ private String value;
+
+ /**
+ *
+ *
+ * @param annotation
+ * The EAnnotation to edit
+ * @param key
+ * The EAnnotation's key to edit
+ * @param value
+ * The value to set
+ */
+ public AddEntryCommand(EAnnotation annotation, String key, String value) {
+ this.annotation = annotation;
+ this.key = key;
+ this.value = value;
+ }
+
+ public void execute() {
+ annotation.getDetails().put(key, value);
+ }
+
+ public void redo() {
+ execute();
+ }
+
+ @Override
+ public void undo() {
+ annotation.getDetails().remove(key);
+ }
+
+ @Override
+ public boolean prepare() {
+ return true;
+ }
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/EMFObservableList.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/EMFObservableList.java
new file mode 100644
index 00000000000..67b5f24364b
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/EMFObservableList.java
@@ -0,0 +1,366 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.databinding;
+
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.databinding.observable.list.ObservableList;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.emf.edit.command.RemoveCommand;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor;
+import org.eclipse.papyrus.infra.widgets.editors.ICommitListener;
+
+/**
+ * An ObservableList using EMF Commands to edit the underlying list.
+ * The commands are executed when the {@link #commit(AbstractEditor)} method is called.
+ * However, the read operations (such as get, size, ...) return up-to-date
+ * results, even when {@link #commit(AbstractEditor)} hasn't been called.
+ *
+ * @author Camille Letavernier
+ */
+@SuppressWarnings({ "unchecked", "rawtypes" })
+public class EMFObservableList extends ObservableList implements ICommitListener {
+
+ /**
+ * The list of commands that haven't been executed yet
+ */
+ protected List<Command> commands = new LinkedList<Command>();
+
+ /**
+ * The editing domain on which the commands will be executed
+ */
+ protected EditingDomain editingDomain;
+
+ /**
+ * The edited EObject
+ */
+ protected EObject source;
+
+ /**
+ * The feature being edited
+ */
+ protected EStructuralFeature feature;
+
+ /**
+ * The list to be updated only on #commit() calls
+ */
+ protected List<?> concreteList;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param wrappedList
+ * The list to be edited when #commit() is called
+ * @param domain
+ * The editing domain on which the commands will be executed
+ * @param source
+ * The EObject from which the list will be retrieved
+ * @param feature
+ * The feature from which the list will be retrieved
+ */
+ public EMFObservableList(List<?> wrappedList, EditingDomain domain, EObject source, EStructuralFeature feature) {
+ super(new LinkedList<Object>(wrappedList), Object.class);
+ this.concreteList = wrappedList;
+ this.editingDomain = domain;
+ this.source = source;
+ this.feature = feature;
+ }
+
+ /**
+ * Forces this list to commit all the pending commands. Only one composite command will
+ * be executed, and can be undone in a single operation.
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.ICommitListener#commit(AbstractEditor)
+ *
+ */
+ public void commit(AbstractEditor editor) {
+
+ if(commands.isEmpty()) {
+ return;
+ }
+
+ CompoundCommand compoundCommand = new CompoundCommand() {
+
+ @Override
+ public void execute() {
+ super.execute();
+ refreshCacheList();
+ }
+
+ @Override
+ public void undo() {
+ super.undo();
+ refreshCacheList();
+ }
+
+ @Override
+ public void redo() {
+ super.redo();
+ refreshCacheList();
+ }
+
+ @Override
+ protected boolean prepare() {
+ if(commandList.isEmpty()) {
+ return false;
+ } else {
+ //We only test the first command, as the following ones might depend
+ //on the first command's execution. StrictCompoundCommands don't seem
+ //to be compatible with emf transaction (execute() is called by
+ //canExecute(), before the transaction is started)
+ return commandList.get(0).canExecute();
+ }
+ }
+ };
+
+ for(Command cmd : commands) {
+ compoundCommand.append(cmd);
+ }
+
+ editingDomain.getCommandStack().execute(compoundCommand);
+ refreshCacheList();
+ commands.clear();
+ }
+
+ /**
+ * Refresh the cached list by copying the real list
+ */
+ protected void refreshCacheList() {
+ if(isDisposed()) {
+ //This observable can be disposed, but the commands might still be
+ //in the command stack. Undo() or Redo() will call this method, which
+ //should be ignored. The command should probably not call refresh directly ;
+ //we should have listeners on the concrete list... but it is not necessarily
+ //observable
+ return;
+ }
+ wrappedList.clear();
+ wrappedList.addAll(concreteList);
+ fireListChange(null);
+ }
+
+ @Override
+ public void add(int index, Object value) {
+ Command command = getAddCommand(index, value);
+ commands.add(command);
+
+ wrappedList.add(index, value);
+ fireListChange(null);
+ }
+
+ @Override
+ public void clear() {
+ Command command = getClearCommand();
+ commands.add(command);
+
+ wrappedList.clear();
+ fireListChange(null);
+ }
+
+ @Override
+ public boolean add(Object o) {
+ Command command = getAddCommand(o);
+ commands.add(command);
+
+ boolean result = wrappedList.add(o);
+ fireListChange(null);
+ return result;
+ }
+
+ @Override
+ public boolean remove(Object o) {
+ Command command = getRemoveCommand(o);
+
+ commands.add(command);
+
+ boolean result = wrappedList.remove(o);
+ fireListChange(null);
+ return result;
+ }
+
+ @Override
+ public boolean addAll(Collection c) {
+ Command command = getAddAllCommand(c);
+ commands.add(command);
+
+ boolean result = wrappedList.addAll(c);
+ fireListChange(null);
+ return result;
+ }
+
+ @Override
+ public boolean addAll(int index, Collection c) {
+ Command command = getAddAllCommand(index, c);
+ commands.add(command);
+
+ boolean result = wrappedList.addAll(index, c);
+ fireListChange(null);
+ return result;
+ }
+
+ @Override
+ public boolean removeAll(Collection c) {
+ Command command = getRemoveCommand(c);
+ commands.add(command);
+
+ boolean result = wrappedList.removeAll(c);
+ fireListChange(null);
+ return result;
+ }
+
+ @Override
+ public boolean retainAll(Collection c) {
+ Command command = getRetainAllCommand(c);
+ commands.add(command);
+
+ boolean result = wrappedList.retainAll(c);
+ fireListChange(null);
+ return result;
+ }
+
+ @Override
+ public Object set(int index, Object element) {
+ Command command = getSetCommand(index, element);
+ commands.add(command);
+
+ Object result = wrappedList.set(index, element);
+ fireListChange(null);
+ return result;
+ }
+
+ @Override
+ public Object move(int oldIndex, int newIndex) {
+ commands.addAll(getMoveCommands(oldIndex, newIndex));
+
+ Object value = get(oldIndex);
+ wrappedList.remove(oldIndex);
+ wrappedList.add(newIndex, value);
+
+ fireListChange(null);
+
+ return value;
+ }
+
+ @Override
+ public Object remove(int index) {
+ Object value = get(index);
+ if(value != null) {
+ Command command = getRemoveCommand(index);
+ commands.add(command);
+ }
+
+ Object result = wrappedList.remove(index);
+ fireListChange(null);
+ return result;
+ }
+
+ public Command getAddCommand(int index, Object value) {
+ return AddCommand.create(editingDomain, source, feature, value, index);
+ }
+
+ public Command getAddCommand(Object value) {
+ return AddCommand.create(editingDomain, source, feature, value);
+ }
+
+ public Command getAddAllCommand(Collection<?> values) {
+ return AddCommand.create(editingDomain, source, feature, values);
+ }
+
+ public Command getAddAllCommand(int index, Collection<?> values) {
+ return AddCommand.create(editingDomain, source, feature, values, index);
+ }
+
+ public Command getClearCommand() {
+ return getRemoveAllCommand(new LinkedList<Object>(wrappedList));
+ }
+
+ public Command getRemoveCommand(int index) {
+ Object value = get(index);
+ return getRemoveCommand(value);
+ }
+
+ public Command getRemoveCommand(Object value) {
+ Command cmd = RemoveCommand.create(editingDomain, source, feature, value);
+ if (value instanceof EObject && feature instanceof EReference && ((EReference)feature).isContainment()) {
+ addDestroyCommand(cmd, (EObject)value);
+ }
+ return cmd;
+ }
+
+ public Command getRemoveAllCommand(Collection<?> values) {
+ CompoundCommand cc = new CompoundCommand("Edit list");
+
+ if (feature instanceof EReference && ((EReference)feature).isContainment() && values != null) {
+ for (Object o : values) {
+ if (o instanceof EObject) {
+ addDestroyCommand(cc, (EObject)o);
+ }
+ }
+ }
+
+ cc.append(RemoveCommand.create(editingDomain, source, feature, values));
+ return cc;
+ }
+
+ public List<Command> getMoveCommands(int oldIndex, int newIndex) {
+ Object value = get(oldIndex);
+ List<Command> commands = new LinkedList<Command>();
+ commands.add(getRemoveCommand(value));
+ commands.add(getAddCommand(newIndex, value));
+ return commands;
+ }
+
+ public Command getRetainAllCommand(Collection<?> values) {
+ List<Object> objectsToRemove = new LinkedList<Object>();
+ for(Object object : values) {
+ if(!contains(object)) {
+ objectsToRemove.add(object);
+ }
+ }
+ if(!objectsToRemove.isEmpty()) {
+ return getRemoveAllCommand(objectsToRemove);
+ } else {
+ return null;
+ }
+ }
+
+ public Command getSetCommand(int index, Object value) {
+ Object oldValue = get(index);
+ Command command = SetCommand.create(editingDomain, source, feature, value, index);
+ if (oldValue instanceof EObject && feature instanceof EReference && ((EReference)feature).isContainment()) {
+ addDestroyCommand(command, (EObject)oldValue);
+ }
+ return command;
+ }
+
+ protected void addDestroyCommand(Command cmd, EObject objToDestroy) {
+ Command destroyCmd = DeleteCommand.create(editingDomain, objToDestroy);
+
+ if (cmd instanceof CompoundCommand) {
+ ((CompoundCommand)cmd).append(destroyCmd);
+ } else {
+ cmd.chain(destroyCmd);
+ }
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/EMFObservableValue.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/EMFObservableValue.java
new file mode 100644
index 00000000000..6ddd393f854
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/databinding/EMFObservableValue.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.databinding;
+
+import org.eclipse.core.databinding.observable.Realm;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.databinding.EObjectObservableValue;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+
+/**
+ * An Observable value to edit EMF values through EMF commands.
+ *
+ * @author Camille Letavernier
+ */
+public class EMFObservableValue extends EObjectObservableValue {
+
+ /**
+ * The editing domain on which the commands will be executed
+ */
+ protected EditingDomain domain;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param eObject
+ * The eObject being edited
+ * @param eStructuralFeature
+ * The structuralFeature being edited
+ * @param domain
+ * The Editing domain on which the commands will be executed
+ */
+ public EMFObservableValue(EObject eObject, EStructuralFeature eStructuralFeature, EditingDomain domain) {
+ this(Realm.getDefault(), eObject, eStructuralFeature, domain);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param realm
+ * @param eObject
+ * The eObject being edited
+ * @param eStructuralFeature
+ * The structuralFeature being edited
+ * @param domain
+ * The Editing domain on which the commands will be executed
+ */
+ public EMFObservableValue(Realm realm, EObject eObject, EStructuralFeature eStructuralFeature, EditingDomain domain) {
+ super(realm, eObject, eStructuralFeature);
+ this.domain = domain;
+ }
+
+ @Override
+ protected void doSetValue(Object value) {
+ EObject eObject = EMFHelper.getEObject(value);
+ if(eObject != null) {
+ value = eObject;
+ }
+
+ Command command = getSetCommand(value);
+ domain.getCommandStack().execute(command);
+ }
+
+ /**
+ * Returns the command used to edit the value
+ *
+ * @param value
+ * The new value
+ * @return
+ * The Set command used to edit the value
+ */
+ protected Command getSetCommand(Object value) {
+ Object oldValue = getValue();
+
+ CompoundCommand cc = new CompoundCommand("Edit value");
+
+ if (oldValue instanceof EObject && eStructuralFeature instanceof EReference && ((EReference)eStructuralFeature).isContainment()) {
+ cc.append(DeleteCommand.create(domain, (EObject)oldValue));
+ }
+
+ cc.append(new SetCommand(domain, eObject, eStructuralFeature, value));
+
+ return cc;
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/dialog/CommandCreationProgressMonitorDialog.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/dialog/CommandCreationProgressMonitorDialog.java
new file mode 100644
index 00000000000..be0fbe08ce4
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/dialog/CommandCreationProgressMonitorDialog.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.dialog;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ *
+ * This dialog allows to create a command using a progress bar dialog
+ * Typical usage is:
+ *
+ * <pre>
+ * CreationCommandProgressMonitorDialog commandCreationDialog = new CreationCommandProgressMonitorDialog(Display.getShell());
+ *
+ * try {
+ * commandCreationDialog.run(true, true, new IRunnableWithProgress() {
+ *
+ * public void run(final IProgressMonitor cancelProvider) throws InvocationTargetException, InterruptedException {
+ * final Command cmd = commandProvider.getCommand();
+ * commandCreationDialog.setCreatedCommand(cmd);
+ * }
+ * });
+ * } catch (final InvocationTargetException e) {
+ * Activator.log.error(e);
+ * } catch (final InterruptedException e) {
+ * Activator.log.error(e);
+ * }
+ * final int returnCode = commandCreationDialog.getReturnCode();
+ * if(returnCode == Window.OK) {
+ * final Command createdCommand = commandCreationDialog.getCreatedCommand();
+ * ...
+ * }
+ * </pre>
+ */
+public class CommandCreationProgressMonitorDialog extends ProgressMonitorDialog {
+
+ /** the created command */
+ private Command createdCommand = null;
+
+ /** an exception threw by the command creation */
+ private Exception exception;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ */
+ public CommandCreationProgressMonitorDialog(final Shell parent) {
+ super(parent);
+
+ }
+
+ /**
+ * Setter for {@link #createdCommand}
+ *
+ * @param cmd
+ * the created command
+ */
+ public void setCreatedCommand(final Command cmd) {
+ this.createdCommand = cmd;
+ }
+
+ /**
+ * Getter for {@link #createdCommand}
+ *
+ * @return
+ * the created command
+ */
+ public Command getCreatedCommand() {
+ return this.createdCommand;
+ }
+
+ public void setCaughtException(final Exception e) {
+ this.exception = e;
+ }
+
+ /**
+ *
+ * @return
+ * the exception throwed by the command creation
+ */
+ public Exception getCaughtException() {
+ return this.exception;
+ }
+
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/Messages.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/Messages.java
new file mode 100644
index 00000000000..04d8fa9b5a0
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/Messages.java
@@ -0,0 +1,17 @@
+package org.eclipse.papyrus.infra.emf.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.emf.messages.messages"; //$NON-NLS-1$
+
+ public static String UnsetCommand_UnsetCommand;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/messages.properties b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/messages.properties
new file mode 100644
index 00000000000..b5119e19f07
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/messages/messages.properties
@@ -0,0 +1 @@
+UnsetCommand_UnsetCommand=Unset Command
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/AnyTypeLabelProvider.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/AnyTypeLabelProvider.java
new file mode 100644
index 00000000000..4e1203a22e1
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/AnyTypeLabelProvider.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (camille.letavernier@cea.fr) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.providers;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * A LabelProvider for unresolved "AnyType" elements
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class AnyTypeLabelProvider extends EMFLabelProvider implements IFilteredLabelProvider {
+
+ @Override
+ public String getText(Object element) {
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if(!(eObject instanceof AnyType)) {
+ return super.getText(element);
+ }
+
+ AnyType anyType = (AnyType)eObject;
+ EClass eClass = anyType.eClass();
+ if(eClass != null) {
+ return "Missing " + eClass.getName();
+ } else {
+ return "Missing component";
+ }
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ EObject eObject = EMFHelper.getEObject(element);
+ if(!(eObject instanceof AnyType)) {
+ return super.getImage(element);
+ }
+
+ return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK);
+ }
+
+ public boolean accept(Object element) {
+ return EMFHelper.getEObject(element) instanceof AnyType;
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFContentProvider.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFContentProvider.java
new file mode 100644
index 00000000000..b03ffe1f2f2
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFContentProvider.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.providers;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.papyrus.infra.emf.providers.strategy.ContainmentBrowseStrategy;
+import org.eclipse.papyrus.infra.emf.providers.strategy.SemanticEMFContentProvider;
+import org.eclipse.papyrus.infra.emf.utils.HistoryUtil;
+import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.EncapsulatedContentProvider;
+import org.eclipse.papyrus.infra.widgets.strategy.IStrategyBasedContentProvider;
+import org.eclipse.papyrus.infra.widgets.strategy.ProviderBasedBrowseStrategy;
+import org.eclipse.papyrus.infra.widgets.strategy.StrategyBasedContentProvider;
+import org.eclipse.papyrus.infra.widgets.strategy.TreeBrowseStrategy;
+
+/**
+ * A global Content provider for EMF
+ *
+ * @author Camille Letavernier
+ */
+public class EMFContentProvider extends EncapsulatedContentProvider {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param feature
+ * The feature representing the reference for which we want to retrieve possible values
+ * @param eObject
+ */
+ public EMFContentProvider(EObject editedEObject, EStructuralFeature feature) {
+ IStructuredContentProvider provider = getSemanticProvider(editedEObject, feature);
+
+ encapsulated = encapsulateProvider(provider, editedEObject, feature);
+ }
+
+ /**
+ * Returns the content provider associated to feature being edited
+ *
+ * @param editedEObject
+ * The object being edited
+ * @param feature
+ * The object's feature being edited
+ * @return
+ * A content provider returning all the values valid for the given feature
+ */
+ protected IStructuredContentProvider getSemanticProvider(EObject editedEObject, EStructuralFeature feature) {
+ EClassifier type = feature.getEType();
+ if(type instanceof EEnum) {
+ return new EMFEnumeratorContentProvider(feature);
+ } else if(type instanceof EClass) {
+ return new SemanticEMFContentProvider(editedEObject, feature);
+ }
+
+ return EmptyContentProvider.instance;
+ }
+
+ /**
+ * Encapsulates the given content provider in a higher-level content provider
+ * The returned provider uses two different strategies to display and search
+ * elements, and adds a pattern filter and an History
+ *
+ * @param provider
+ * The ContentProvider to encapsulate
+ * @return
+ */
+ protected EMFGraphicalContentProvider encapsulateProvider(IStructuredContentProvider provider, EObject editedEObject, EStructuralFeature feature) {
+ String historyId = HistoryUtil.getHistoryID(editedEObject, feature);
+
+ IStructuredContentProvider contentProvider;
+
+ if(provider instanceof ITreeContentProvider) {
+ contentProvider = getStrategyProvider((ITreeContentProvider)provider);
+ } else {
+ contentProvider = provider;
+ }
+
+ ResourceSet rs = editedEObject == null ? null : editedEObject.eResource() == null ? null : editedEObject.eResource().getResourceSet();
+ EMFGraphicalContentProvider graphicalProvider = new EMFGraphicalContentProvider(contentProvider, rs, historyId);
+
+ return graphicalProvider;
+ }
+
+ protected IStrategyBasedContentProvider getStrategyProvider(ITreeContentProvider provider) {
+ TreeBrowseStrategy browseStrategy = new ProviderBasedBrowseStrategy(provider);
+ TreeBrowseStrategy revealStrategy = new ContainmentBrowseStrategy(provider);
+
+ return new StrategyBasedContentProvider(browseStrategy, revealStrategy);
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFEnumeratorContentProvider.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFEnumeratorContentProvider.java
new file mode 100644
index 00000000000..a4d5f0c9d1d
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFEnumeratorContentProvider.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.providers;
+
+import org.eclipse.emf.common.util.Enumerator;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EEnumLiteral;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.infra.widgets.providers.AbstractStaticContentProvider;
+
+/**
+ * An IStaticContentProvider for EMF enumerators.
+ *
+ * @author Camille Letavernier
+ */
+public class EMFEnumeratorContentProvider extends AbstractStaticContentProvider {
+
+ /**
+ * The feature representing the Enumerator for this ContentProvider
+ */
+ protected EStructuralFeature feature;
+
+ /**
+ * Constructs an EcoreEnumerator for the given Structural Feature
+ *
+ * @param feature
+ */
+ public EMFEnumeratorContentProvider(EStructuralFeature feature) {
+ this.feature = feature;
+ }
+
+ public Object[] getElements() {
+ EClassifier type = feature.getEType();
+ EEnum enumerated = (EEnum)type;
+ EEnumLiteral[] literals = enumerated.getELiterals().toArray(new EEnumLiteral[0]);
+ Enumerator[] values = new Enumerator[literals.length];
+
+ int i = 0;
+ for(EEnumLiteral literal : literals) {
+ Enumerator value = literal.getInstance();
+ values[i++] = value;
+ }
+
+ return values;
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFFilteredLabelProvider.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFFilteredLabelProvider.java
new file mode 100644
index 00000000000..4b8190009c1
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFFilteredLabelProvider.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.providers;
+
+import java.util.Iterator;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.services.labelprovider.service.IFilteredLabelProvider;
+
+/**
+ * A LabelProvider which only accepts EMF Objects (EObject, or objects which can be adapted to EObjects)
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class EMFFilteredLabelProvider extends EMFLabelProvider implements IFilteredLabelProvider {
+
+ public boolean accept(IStructuredSelection selection) {
+ if(selection.isEmpty()) {
+ return false;
+ }
+
+ Iterator<?> iterator = selection.iterator();
+ while(iterator.hasNext()) {
+ Object element = iterator.next();
+ if(!accept(element)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public boolean accept(Object element) {
+ if(element instanceof IStructuredSelection) {
+ return accept((IStructuredSelection)element);
+ }
+
+ //The element is an EObject or can be adapted to an EObject
+ return EMFHelper.getEObject(element) != null;
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFGraphicalContentProvider.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFGraphicalContentProvider.java
new file mode 100644
index 00000000000..16cc0586c3a
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFGraphicalContentProvider.java
@@ -0,0 +1,482 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Added graphic contributions for the filters
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial History implementation
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - History integration
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.providers;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.papyrus.infra.emf.Activator;
+import org.eclipse.papyrus.infra.services.labelprovider.service.IDetailLabelProvider;
+import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor;
+import org.eclipse.papyrus.infra.widgets.editors.ICommitListener;
+import org.eclipse.papyrus.infra.widgets.editors.StringEditor;
+import org.eclipse.papyrus.infra.widgets.providers.CollectionContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.EncapsulatedContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.PatternViewerFilter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Table;
+
+/**
+ * This providers adds a text-filter and an History to EMF-based content providers
+ */
+//TODO : Extend (Abstract)FilteredContentProvider
+public class EMFGraphicalContentProvider extends EncapsulatedContentProvider implements ISelectionChangedListener {
+
+ private static final String DIALOG_SETTINGS = EMFGraphicalContentProvider.class.getName();
+
+ protected String historyId;
+
+ //Unused (yet)
+ //TODO : Add a preference or a collapsible composite for this feature (Or both)
+ //
+ // /**
+ // * The current metaclass viewer filter
+ // */
+ // protected ViewerFilter currentMetaclassViewerFilter;
+
+ protected ViewerFilter patternFilter;
+
+ private static final String HISTORY_SETTINGS = "History"; //$NON-NLS-1$
+
+ private static final String PREVIOUS_SELECTION = "PreviousSelection";
+
+ protected List<EObject> selectionHistory;
+
+ protected CLabel detailLabel;
+
+ protected Object selectedObject;
+
+ protected StructuredViewer viewer;
+
+ protected ResourceSet resourceSet;
+
+ private static final int HISTORY_MAX_SIZE = 5;
+
+ private String currentFilterPattern;
+
+ private TableViewer historyViewer;
+
+ /**
+ * the wanted root of the contentprovider
+ */
+
+ /**
+ * the constructor
+ */
+ public EMFGraphicalContentProvider(IStructuredContentProvider semanticProvider, ResourceSet resourceSet, String historyId) {
+ super(semanticProvider);
+ this.historyId = historyId;
+ this.resourceSet = resourceSet;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void createBefore(Composite parent) {
+ createPatternFilter(parent);
+ }
+
+ protected void createPatternFilter(Composite parent) {
+ StringEditor editor = new StringEditor(parent, SWT.NONE);
+ editor.setLabel("Filter:");
+ editor.setToolTipText("Enter the name of the element you're looking for. You can use * as a wildcard");
+ editor.setValidateOnDelay(true);
+ patternFilter = new PatternViewerFilter();
+ currentFilterPattern = ""; //$NON-NLS-1$
+ ((PatternViewerFilter)patternFilter).setPattern(currentFilterPattern);
+
+ editor.addCommitListener(new ICommitListener() {
+
+ public void commit(AbstractEditor editor) {
+ String filterPattern = (String)((StringEditor)editor).getValue();
+ ((PatternViewerFilter)patternFilter).setPattern(filterPattern);
+ viewer.refresh();
+ if(!("".equals(filterPattern) || currentFilterPattern.equals(filterPattern))) {
+
+ //FIXME: The reveal first match algorithm is not compatible with infinite trees and had bad performances
+ //Object firstMatch = getFirstMatchingElement(null);
+ //if(firstMatch != null) {
+ // revealSemanticElement(Collections.singletonList(firstMatch));
+ //}
+
+ currentFilterPattern = filterPattern;
+ }
+ }
+
+ });
+
+ List<ViewerFilter> filters = new LinkedList<ViewerFilter>(Arrays.asList(viewer.getFilters()));
+ filters.add(patternFilter);
+ viewer.setFilters(filters.toArray(new ViewerFilter[filters.size()]));
+ }
+
+ /**
+ * Returns the first (encapsulated) element matching the current filters
+ *
+ * @return
+ */
+ protected Object getFirstMatchingElement(Object parent) {
+ //Browse from the root element
+ if(parent == null) {
+ for(Object parentElement : getElements(viewer.getInput())) {
+ Object firstMatch = getFirstMatchingElement(parentElement);
+ if(firstMatch != null) {
+ return firstMatch;
+ }
+ }
+ return null;
+ }
+
+ for(ViewerFilter filter : viewer.getFilters()) {
+ if(!filter.select(viewer, getParent(parent), parent)) {
+ return null;
+ }
+ }
+
+ //Test the current element
+ if(isValidValue(parent)) {
+ return parent;
+ }
+
+ //Browse the child elements
+ for(Object childElement : getChildren(parent)) {
+ Object firstMatch = getFirstMatchingElement(childElement);
+ if(firstMatch != null) {
+ return firstMatch;
+ }
+ }
+
+ //No match found
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void createAfter(Composite parent) {
+ parent.setLayout(new GridLayout(1, false));
+ // createMetaclassFilter(parent); //Disabled
+ createHistory(parent);
+ createDetailArea(parent);
+ }
+
+ /**
+ * Creates a widget referencing the recently selected elements
+ *
+ * @param parent
+ * The composite in which the widget will be created
+ */
+ protected void createHistory(Composite parent) {
+ initSelectionHistory();
+
+ Group historyGroup = new Group(parent, SWT.NONE);
+ historyGroup.setText("Recent selections");
+ historyGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
+ historyGroup.setLayout(new GridLayout(1, true));
+
+ // table
+ Table historyTable = new Table(historyGroup, SWT.BORDER | SWT.SINGLE);
+ GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
+ data.heightHint = 70;
+ historyTable.setLayoutData(data);
+ historyViewer = new TableViewer(historyTable);
+ historyViewer.setContentProvider(CollectionContentProvider.instance);
+ historyViewer.setLabelProvider(viewer.getLabelProvider());
+ historyViewer.setInput(selectionHistory);
+ historyViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ /**
+ * {@inheritDoc}
+ */
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection selection = (IStructuredSelection)historyViewer.getSelection();
+ Object selectedObject = selection.getFirstElement();
+ if(selectedObject instanceof EObject) {
+ EObject eObject = ((EObject)selectedObject);
+ revealSemanticElement(Collections.singletonList(eObject));
+ }
+ }
+ });
+ }
+
+ /**
+ * Inits the History
+ */
+ protected void initSelectionHistory() {
+ selectionHistory = new ArrayList<EObject>(HISTORY_MAX_SIZE + 1);
+
+ IDialogSettings historySettings = getDialogSettings().getSection(HISTORY_SETTINGS);
+ if(historySettings != null && resourceSet != null) {
+ String[] uriHistory = historySettings.getArray(PREVIOUS_SELECTION);
+ // for each element in the list, try to get the EObject by its URI
+ if(uriHistory != null) {
+ for(String uri : uriHistory) {
+ try {
+ EObject object = resourceSet.getEObject(URI.createURI(uri), true);
+ if(object != null && !selectionHistory.contains(object)) {
+ selectionHistory.add(object);
+ }
+ } catch (Exception ex) {
+ //Ignore : if the resource doesn't exist anymore, we just skip it
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Creates a widget to filter the tree according to the selected
+ * metaclass.
+ *
+ * @param parent
+ * The Composite in which the widgets will be created
+ * @deprecated
+ */
+ @Deprecated
+ protected void createMetaclassFilter(Composite parent) {
+ // if(semanticRoot == null) {
+ // return;
+ // }
+ //
+ // Composite container = new Composite(parent, SWT.NONE);
+ // container.setLayout(new GridLayout(2, false));
+ // container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ //
+ // ResourceSet resourceSet = semanticRoot.eResource().getResourceSet();
+ // EcoreUtil.resolveAll(resourceSet);
+ //
+ // Label metamodelLabel = new Label(container, SWT.NONE);
+ // metamodelLabel.setText("Metamodel:");
+ //
+ // ComboViewer metamodelViewer = new ComboViewer(container);
+ // metamodelViewer.setContentProvider(getMetamodelContentProvider());
+ // metamodelViewer.setLabelProvider(new EMFLabelProvider());
+ // metamodelViewer.setInput(semanticRoot);
+ // metamodelViewer.getCombo().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ //
+ // Label metaclassLabel = new Label(container, SWT.NONE);
+ // metaclassLabel.setText("Metaclass:");
+ //
+ // final ComboViewer metaclassViewer = new ComboViewer(container);
+ // IStructuredContentProvider metaclassProvider = getMetaclassContentProvider();
+ // metaclassViewer.setContentProvider(metaclassProvider);
+ // metaclassViewer.setLabelProvider(new EMFLabelProvider());
+ // metaclassViewer.getCombo().setEnabled(false);
+ // metaclassViewer.getCombo().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ //
+ // metamodelViewer.setFilters(new ViewerFilter[]{ new MetamodelContentFilter(metaclassProvider) });
+ //
+ // metamodelViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ //
+ // public void selectionChanged(SelectionChangedEvent event) {
+ // metaclassViewer.setInput(((IStructuredSelection)event.getSelection()).getFirstElement());
+ // metaclassViewer.getCombo().setEnabled(true);
+ // }
+ // });
+ //
+ // metaclassViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ //
+ // public void selectionChanged(SelectionChangedEvent event) {
+ // if(!event.getSelection().isEmpty()) {
+ // Object selectedObject = ((IStructuredSelection)event.getSelection()).getFirstElement();
+ // List<ViewerFilter> filters = new LinkedList<ViewerFilter>(Arrays.asList(viewer.getFilters()));
+ // filters.remove(currentMetaclassViewerFilter);
+ // currentMetaclassViewerFilter = getMetaclassViewerFilter(selectedObject);
+ // filters.add(currentMetaclassViewerFilter);
+ // viewer.setFilters(filters.toArray(new ViewerFilter[filters.size()]));
+ // viewer.refresh();
+ // }
+ // }
+ // });
+ }
+
+ /**
+ * Creates a label widget to display detailed information on the
+ * current value (Such as fully qualified name, ...)
+ *
+ * @param parent
+ * The composite in which the widget will be created
+ */
+ protected void createDetailArea(Composite parent) {
+ detailLabel = new CLabel(parent, SWT.BORDER);
+ detailLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ updateDetailLabel();
+ }
+
+ // @Deprecated
+ // protected IStructuredContentProvider getMetamodelContentProvider() {
+ // return new MetamodelContentProvider();
+ // }
+ //
+ // @Deprecated
+ // protected IStructuredContentProvider getMetaclassContentProvider() {
+ // return new MetaclassContentProvider((EClass)this.metaClassWanted, this.metaClassNotWantedList);
+ // }
+ //
+ // @Deprecated
+ // protected ILabelProvider getLabelProvider() {
+ // return new EMFObjectLabelProvider();
+ // }
+ //
+ // @Deprecated
+ // protected ViewerFilter getMetaclassViewerFilter(Object selectedMetaClass) {
+ // return new MetaclassViewerFilter(selectedMetaClass);
+ // }
+
+ /**
+ * Returns the dialog settings. Returned object can't be null.
+ *
+ * @return dialog settings for this dialog
+ */
+ protected IDialogSettings getDialogSettings() {
+ IDialogSettings settings = Activator.getDefault().getDialogSettings().getSection(getDialogSettingsIdentifier());
+ if(settings == null) {
+ settings = Activator.getDefault().getDialogSettings().addNewSection(getDialogSettingsIdentifier());
+ }
+ return settings;
+ }
+
+ private String getDialogSettingsIdentifier() {
+ return DIALOG_SETTINGS + "_" + historyId;
+ }
+
+ /**
+ * Stores dialog settings.
+ *
+ * @param settings
+ * settings used to store dialog
+ */
+ protected void storeDialog(IDialogSettings settings, Collection<EObject> newValues) {
+ selectionHistory.removeAll(newValues);
+
+ selectionHistory.addAll(0, newValues);
+
+ //Truncate the history: only keep a sublist of size HISTORY_MAX_SIZE
+ if(selectionHistory.size() > HISTORY_MAX_SIZE) {
+ selectionHistory = selectionHistory.subList(0, HISTORY_MAX_SIZE);
+ }
+
+ List<String> uriList = new ArrayList<String>();
+
+ // convert list of EObject into URI string list
+ for(EObject object : selectionHistory) {
+ URI uri = EcoreUtil.getURI(object);
+ uriList.add(uri.toString());
+ }
+
+ IDialogSettings historySettings = settings.getSection(HISTORY_SETTINGS);
+ if(historySettings == null) {
+ historySettings = settings.addNewSection(HISTORY_SETTINGS);
+ }
+ historySettings.put(PREVIOUS_SELECTION, uriList.toArray(new String[uriList.size()]));
+
+ historyViewer.setInput(selectionHistory);
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ encapsulated.inputChanged(viewer, oldInput, newInput);
+
+ if(viewer instanceof StructuredViewer) {
+ this.viewer = (StructuredViewer)viewer;
+ if(newInput != null && viewer.getControl() != null && !viewer.getControl().isDisposed()) {
+ this.viewer.addSelectionChangedListener(this);
+ }
+ } else {
+ this.viewer = null;
+ }
+ }
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ selectedObject = ((IStructuredSelection)event.getSelection()).getFirstElement();
+ updateDetailLabel();
+ }
+
+ private void updateDetailLabel() {
+ if(detailLabel == null || detailLabel.isDisposed()) {
+ return;
+ }
+ if(selectedObject == null) {
+ detailLabel.setText("");
+ detailLabel.setImage(null);
+ } else {
+ ILabelProvider labelProvider = (ILabelProvider)viewer.getLabelProvider();
+ String description;
+ if(labelProvider instanceof IDetailLabelProvider) {
+ description = ((IDetailLabelProvider)labelProvider).getDetail(selectedObject);
+ } else {
+ description = labelProvider.getText(selectedObject);
+ }
+ detailLabel.setText(description);
+ detailLabel.setImage(labelProvider.getImage(selectedObject));
+ }
+ detailLabel.getParent().getParent().layout();
+ }
+
+ @Override
+ public void commit(AbstractEditor editor) {
+ Iterator<?> selectionIterator = ((IStructuredSelection)viewer.getSelection()).iterator();
+ Set<EObject> eObjectsToStore = new LinkedHashSet<EObject>();
+ while(selectionIterator.hasNext()) {
+ Object selectedElement = selectionIterator.next();
+ if(isValidValue(selectedElement)) {
+ Object semanticObject = getAdaptedValue(selectedElement);
+ if(semanticObject instanceof EObject) {
+ eObjectsToStore.add((EObject)semanticObject);
+ }
+ }
+ }
+
+ if(!eObjectsToStore.isEmpty()) {
+ storeDialog(getDialogSettings(), eObjectsToStore);
+ }
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ viewer.removeSelectionChangedListener(this);
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFLabelProvider.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFLabelProvider.java
new file mode 100644
index 00000000000..e91126d9a5c
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFLabelProvider.java
@@ -0,0 +1,326 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.providers;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.infra.browser.uicore.CustomizableModelLabelProvider;
+import org.eclipse.emf.facet.infra.browser.uicore.internal.model.ITreeElement;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.emf.Activator;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.services.labelprovider.service.IDetailLabelProvider;
+import org.eclipse.papyrus.infra.services.labelprovider.service.IQualifierLabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * This class handles labels for EMF Objects
+ * The class can handle the following cases :
+ * - An EObject (Which can be resolved with {@link EMFHelper#getEObject(Object)})
+ * - A IStructuredSelection containing EObject(s)
+ *
+ * @author Camille Letavernier
+ */
+public class EMFLabelProvider extends CustomizableModelLabelProvider implements IDetailLabelProvider, IQualifierLabelProvider {
+
+ /** the max number of displayed element */
+ public static final int MAX_ELEMENT = 2;
+
+ protected ILabelProvider baseEMFLabelProvider;
+
+ /**
+ * Creates a new EMFObjectLabelProvider.
+ */
+ public EMFLabelProvider() {
+ super(Activator.getDefault().getCustomizationManager()); //Note: CustomizableModelLabelProvider doesn't use the CustomizationManager. It relies on the content provider's CustomizationManager
+ baseEMFLabelProvider = new StandardEMFLabelProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getText(Object element) {
+ if(element == null) {
+ return ""; //$NON-NLS-1$
+ }
+
+ if(element instanceof ITreeElement) {
+ return super.getText(element);
+ }
+
+ EObject eObject = EMFHelper.getEObject(element);
+ if(eObject != null) {
+ return getText(eObject);
+ }
+
+ if(element instanceof IStructuredSelection) {
+ return getText((IStructuredSelection)element);
+ }
+
+ return element.toString();
+ }
+
+ protected String getText(EObject element) {
+ return baseEMFLabelProvider.getText(element);
+ }
+
+ protected String getText(IStructuredSelection selection) {
+ final int selectionSize = selection.size();
+ int managedSize = selectionSize;
+ if(selectionSize > MAX_ELEMENT) {
+ managedSize = MAX_ELEMENT;
+ }
+ if(selection.isEmpty()) {
+ return ""; //$NON-NLS-1$
+ }
+
+ if(managedSize == 1) {
+ return getText(selection.getFirstElement());
+ } else {
+ final List<Object> selectionAsList = selection.toList();
+ String str = "";
+ for(int i = 0; i < managedSize; i++) {
+ final String txt = getText(selectionAsList.get(i));
+ if(txt != null) {
+ str += txt;
+ }
+ if(i < managedSize - 1) {
+ str += ", ";
+ }
+ }
+ if(selectionSize > managedSize) {
+ str += " + " + (selectionSize - managedSize) + " others elements.";
+ }
+ return str;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Image getImage(Object element) {
+ if(element instanceof ITreeElement) {
+ return super.getImage(element);
+ }
+
+ EObject eObject = EMFHelper.getEObject(element);
+ if(eObject != null) {
+ return getImage(eObject);
+ }
+
+ if(element instanceof IStructuredSelection) {
+ return getImage((IStructuredSelection)element);
+ }
+
+ return null;
+ }
+
+ protected Image getImage(EObject eObject) {
+ return baseEMFLabelProvider.getImage(eObject);
+ }
+
+ protected Image getImage(IStructuredSelection selection) {
+ int selectionSize = selection.size();
+ int managedSize = selectionSize;
+ if(selectionSize > MAX_ELEMENT) {
+ managedSize = MAX_ELEMENT;
+ }
+
+
+ if(selection.isEmpty()) {
+ return null;
+ } else if(selection.size() == 1) {
+ return getImage(selection.getFirstElement());
+ }
+
+ final List<?> selectionAsList = selection.toList();
+ final Set<EObject> selectedEObject = new HashSet<EObject>();
+ boolean isEObjectSelection = true;
+ for(int i = 0; i < managedSize; i++) {
+ final EObject obj = EMFHelper.getEObject(selectionAsList.get(i));
+ if(obj != null) {
+ selectedEObject.add(obj);
+ } else {
+ isEObjectSelection = false;
+ }
+ }
+ //selected object is a set, so the size can be lowest that the initial size
+ selectionSize = selectedEObject.size();
+ if(selectionSize > MAX_ELEMENT) {
+ managedSize = MAX_ELEMENT;
+ }
+ if(isEObjectSelection) {//all selected elements are EObject
+ if(managedSize == 1 || hasCommonImage(selectedEObject)) {
+ return getImage(selectedEObject.toArray()[0]);
+ } else {
+ final EClass common = org.eclipse.emf.facet.util.emf.core.internal.EMFUtils.computeLeastCommonSupertype(getEClasses(selectedEObject));
+ if(!common.isAbstract()) {
+ //FIXME : the label provider service should manage this case
+ final Object instance = common.getEPackage().getEFactoryInstance().create(common);
+ return getNonCommonIcon(instance);
+ }
+ }
+ } else if(selectedEObject.size() == 0) {
+ //the multiple selection contains any EObject
+ } else {
+ //the selection contains EObject and others elements
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param objects
+ * a collection of objects
+ * @return
+ * <code>true</code> if the image found for each object is the same <code>false</code> of if the collection is empty or the image returned
+ * for each object is not the same
+ */
+ protected boolean hasCommonImage(final Collection<?> objects) {
+ if(objects.size() > MAX_ELEMENT) {
+ return false;
+ }
+ if(!objects.isEmpty()) {
+ final Image lastImage = getImage(objects.toArray()[0]);
+ for(final Object current : objects) {
+ if(lastImage != getImage(current)) {
+ return false;
+ }
+ }
+ } else {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ *
+ * @param commonEClass
+ * the eClass
+ * @return
+ * the icon to use for this eclass
+ */
+ protected Image getNonCommonIcon(final Object commonObject) {
+ return getImage(commonObject);
+ }
+
+ /**
+ *
+ * @param objects
+ * a collection of eobject
+ * @return
+ * the set of eclasses for the parameter objects
+ */
+ private Set<EClass> getEClasses(final Collection<EObject> objects) {
+ final Set<EClass> eclasses = new HashSet<EClass>();
+ for(final EObject current : objects) {
+ eclasses.add(current.eClass());
+ }
+ return eclasses;
+ }
+
+ public String getDetail(Object object) {
+ object = EMFHelper.getEObject(object);
+ return getText(object) + " - " + getQualifiedClassName(object); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the qualified Class name of the given EObject, or an
+ * empty String if the object is not an EObject
+ *
+ * @param object
+ * @return The qualified name of this object's class, or an empty
+ * String if the object is not an EObject
+ */
+ protected String getQualifiedClassName(Object object) {
+ if(object instanceof EObject) {
+ EObject eObject = (EObject)object;
+ EClass eClass = eObject.eClass();
+ return EMFHelper.getQualifiedName(eClass, "::"); //$NON-NLS-1$
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+
+
+ public String getQualifierText(Object element) {
+ String result = null;
+
+ EObject parent = getParentObject(element);
+ if(parent != null) {
+ result = getQualifiedText(parent);
+ }
+
+ return result;
+ }
+
+ private EObject getParentObject(Object element) {
+ EObject result = null;
+
+ if(element != null) {
+ EObject eObject = EMFHelper.getEObject(element);
+ if(eObject != null) {
+ result = getParent(eObject);
+ }
+ }
+
+ return result;
+ }
+
+ public Image getQualifierImage(Object element) {
+ Image result = null;
+
+ EObject parent = getParentObject(element);
+ if(parent != null) {
+ result = getImage(parent);
+ }
+
+ return result;
+ }
+
+ protected EObject getParent(EObject object) {
+ return object.eContainer();
+ }
+
+ protected String getQualifiedText(EObject object) {
+ StringBuilder result = new StringBuilder();
+
+ appendQualifiedText(object, result);
+
+ return result.toString();
+ }
+
+ protected void appendQualifiedText(EObject object, StringBuilder buf) {
+ EObject parent = getParent(object);
+ if(parent != null) {
+ appendQualifiedText(parent, buf);
+ }
+
+ if(buf.length() > 0) {
+ buf.append("::");
+ }
+
+ String name = getText(object);
+ if(name == null) {
+ name = String.format("<%s>", object.eClass().getName());
+ }
+ buf.append(name);
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/HistoryContentProvider.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/HistoryContentProvider.java
new file mode 100644
index 00000000000..1dee49a7a56
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/HistoryContentProvider.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.providers;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * Content provider for the history table
+ *
+ * @deprecated Use the generic {@link org.eclipse.papyrus.infra.widgets.providers.CollectionContentProvider#instance} instead
+ */
+@Deprecated
+public class HistoryContentProvider implements IStructuredContentProvider {
+
+ /**
+ * {@inheritDoc}
+ */
+ public void dispose() {
+ // nothing here
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // nothing here
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object[] getElements(Object inputElement) {
+ if(inputElement instanceof List<?>) {
+ return ((List<?>)inputElement).toArray();
+ }
+ return new Object[0];
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/MoDiscoContentProvider.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/MoDiscoContentProvider.java
new file mode 100644
index 00000000000..de352fc6f25
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/MoDiscoContentProvider.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.emf.providers;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.infra.browser.uicore.CustomizableModelContentProvider;
+import org.eclipse.papyrus.infra.core.resource.AbstractBaseModel;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.ModelUtils;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.emf.Activator;
+
+/**
+ * the content provider that inherits of modisco properties
+ *
+ * @deprecated Use SemanticUMLContentProvider instead
+ */
+@Deprecated
+public class MoDiscoContentProvider extends CustomizableModelContentProvider {
+
+ /** The ModelSet containing all the models. This is the initial input. */
+ protected ModelSet modelSet;
+
+ /** The list of open pages (diagrams) */
+ protected IPageManager pageMngr;
+
+ /**
+ * Creates a new MoDiscoContentProvider.
+ */
+ public MoDiscoContentProvider() {
+ super(Activator.getDefault().getCustomizationManager());
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length > 0;
+ }
+
+ @Override
+ public Object[] getChildren(final Object parentElement) {
+ Object[] children = super.getChildren(parentElement);
+ if(children == null) {
+ return new Object[0];
+ }
+ return children;
+ }
+
+ /**
+ * Return the initial values from the input.
+ * Input should be of type {@link UmlModel}.
+ *
+ * @see org.eclipse.gmt.modisco.infra.browser.uicore.CustomizableModelContentProvider#getRootElements(java.lang.Object)
+ *
+ * @param inputElement
+ * @return
+ */
+ @Override
+ public EObject[] getRootElements(Object inputElement) {
+
+ try {
+ if(!(inputElement instanceof ServicesRegistry)) {
+ return null;
+ }
+
+ ServicesRegistry servicesRegistry = (ServicesRegistry)inputElement;
+
+ modelSet = ModelUtils.getModelSetChecked(servicesRegistry);
+ pageMngr = servicesRegistry.getService(IPageManager.class);
+
+ return getRootElements(modelSet);
+ } catch (Exception e) {
+ Activator.log.error(e);
+ }
+
+ return new EObject[0];
+ }
+
+ /**
+ * Get the roots elements from the {@link ModelSet} provided as input.
+ *
+ * @return
+ */
+ protected EObject[] getRootElements(ModelSet modelSet) {
+ //FIXME: Refactoring. Workaround to remove the explicit dependency to UMLModel in uml.tools. We should not depend on UML at all.
+ IModel umlIModel = modelSet.getModel("org.eclipse.papyrus.infra.core.resource.uml.UmlModel");
+
+ AbstractBaseModel umlModel = null;
+ if(umlIModel instanceof AbstractBaseModel) {
+ umlModel = (AbstractBaseModel)umlIModel;
+ }
+
+ if(umlModel == null) {
+ return null;
+ }
+
+ EList<EObject> contents = umlModel.getResource().getContents();
+ ArrayList<EObject> result = new ArrayList<EObject>();
+ Iterator<EObject> iterator = contents.iterator();
+ while(iterator.hasNext()) {
+ EObject eObject = iterator.next();
+ result.add(eObject);
+ }
+ return result.toArray(new EObject[result.size()]);
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/SemanticFromModelExplorer.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/SemanticFromModelExplorer.java
new file mode 100644
index 00000000000..50698bb43ed
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/SemanticFromModelExplorer.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.providers;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.core.IElementWithSemantic;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+
+/**
+ * This class is used to obtain the semantic element for element of the model explorer
+ */
+//FIXME: Remove the dependency to gmf
+public class SemanticFromModelExplorer implements IElementWithSemantic {
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object getSemanticElement(Object wrapper) {
+ EObject semantic = EMFHelper.getEObject(wrapper);
+ if(semantic != null) {
+ return semantic;
+ }
+
+ if(wrapper instanceof Diagram) {
+ return wrapper;
+ }
+
+ return null;
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/StandardEMFLabelProvider.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/StandardEMFLabelProvider.java
new file mode 100644
index 00000000000..51d5774252f
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/StandardEMFLabelProvider.java
@@ -0,0 +1,222 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Added support for enum literals
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Implementation of IDetailLabelProvider
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.emf.providers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.util.Enumerator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.services.labelprovider.service.IDetailLabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * This class handles labels for EMF Objects
+ * The class can handle the following cases :
+ * - An EObject (Which can be resolved with {@link EMFHelper#getEObject(Object)})
+ * - A IStructuredSelection containing EObject(s)
+ *
+ * @author Jerome Benois
+ */
+public class StandardEMFLabelProvider extends AdapterFactoryLabelProvider implements IDetailLabelProvider {
+
+ /** item provider class */
+ private static final Class<?> IItemLabelProviderClass = IItemLabelProvider.class;
+
+ /** list of adapter factories, identified by their Ids */
+ private static Map<String, AdapterFactory> factories = new HashMap<String, AdapterFactory>();
+
+ /** emf item provider factories */
+ private static final String EXT_FACTORIES = "org.eclipse.emf.edit.itemProviderAdapterFactories"; //$NON-NLS-1$
+
+ /**
+ * Creates a new EMFObjectLabelProvider.
+ */
+ public StandardEMFLabelProvider() {
+ super(new ReflectiveItemProviderAdapterFactory());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getText(Object element) {
+ EObject eObject = EMFHelper.getEObject(element);
+ if(eObject != null) {
+ return getText(eObject);
+ }
+
+ if(element instanceof IStructuredSelection) {
+ return getText((IStructuredSelection)element);
+ }
+
+ return super.getText(element);
+ }
+
+ protected String getText(EObject element) {
+ String title = ""; //$NON-NLS-1$
+ if(element instanceof Enumerator) {
+ return ((Enumerator)element).getName();
+ }
+ EObject eObject = EMFHelper.getEObject(element);
+ IItemLabelProvider itemLabelProvider = getItemLabelProvider(eObject);
+ if(itemLabelProvider != null) {
+ title = itemLabelProvider.getText(eObject);
+ }
+
+ if("".equals(title)) { //$NON-NLS-1$
+ title = super.getText(eObject);
+ }
+
+ return title;
+ }
+
+ protected String getText(IStructuredSelection selection) {
+ if(selection.isEmpty()) {
+ return ""; //$NON-NLS-1$
+ }
+
+ //TODO : Implement a multi-selection label, instead of just the first element's label
+ Object element = selection.getFirstElement();
+ return getText(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Image getImage(Object element) {
+ EObject eObject = EMFHelper.getEObject(element);
+ if(eObject != null) {
+ return getImage(eObject);
+ }
+
+ if(element instanceof IStructuredSelection) {
+ return getImage((IStructuredSelection)element);
+ }
+
+ return super.getImage(element);
+ }
+
+ protected Image getImage(EObject eObject) {
+ Image result = null;
+ IItemLabelProvider itemLabelProvider = getItemLabelProvider(eObject);
+ if(itemLabelProvider != null) {
+ result = getImageFromObject(itemLabelProvider.getImage(eObject));
+ }
+
+ return result;
+ }
+
+ protected Image getImage(IStructuredSelection selection) {
+ if(selection.isEmpty()) {
+ return null;
+ }
+
+ //TODO : Implement a multi-selection label, instead of just the first element's label
+ Object element = selection.getFirstElement();
+ return getImage(element);
+ }
+
+ /**
+ * Returns the item provider for the given object
+ *
+ * @param eObject
+ * the object to display
+ * @return the item label provider for the given eobject
+ */
+ private IItemLabelProvider getItemLabelProvider(EObject eObject) {
+ IItemLabelProvider itemLabelProvider = null;
+ if(eObject != null) {
+ AdapterFactory adapterFactory = getEditFactory(eObject);
+ if(adapterFactory != null) {
+ return (IItemLabelProvider)adapterFactory.adapt(eObject, IItemLabelProviderClass);
+ }
+ }
+ return itemLabelProvider;
+ }
+
+ /**
+ * Gets the edit factory.
+ *
+ * @param eobject
+ * the eobject
+ *
+ * @return the edits the factory
+ */
+ public static AdapterFactory getEditFactory(EObject eobject) {
+ String uri = eobject.eClass().getEPackage().getNsURI();
+ return getFactory(uri);
+ }
+
+ /**
+ * Gets the factory from uri.
+ *
+ * @param uri
+ * the uri
+ *
+ * @return the factory
+ */
+ public static AdapterFactory getFactory(String uri) {
+ AdapterFactory factory = factories.get(uri);
+ if(factory == null) {
+ IConfigurationElement[] extensions = Platform.getExtensionRegistry().getConfigurationElementsFor(EXT_FACTORIES);
+ for(IConfigurationElement e : extensions) {
+ if(uri.equals(e.getAttribute("uri"))) { //$NON-NLS-1$
+ try {
+ factory = (AdapterFactory)e.createExecutableExtension("class"); //$NON-NLS-1$
+ if(factory != null) {
+ factories.put(uri, factory);
+ }
+ } catch (CoreException e1) {
+ // do nothing
+ }
+ }
+ }
+ }
+ return factory;
+ }
+
+ public String getDetail(Object object) {
+ object = EMFHelper.getEObject(object);
+ return getText(object) + " - " + getQualifiedClassName(object); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the qualified Class name of the given EObject, or an
+ * empty String if the object is not an EObject
+ *
+ * @param object
+ * @return The qualified name of this object's class, or an empty
+ * String if the object is not an EObject
+ */
+ protected String getQualifiedClassName(Object object) {
+ if(object instanceof EObject) {
+ EObject eObject = (EObject)object;
+ EClass eClass = eObject.eClass();
+ return EMFHelper.getQualifiedName(eClass, "::"); //$NON-NLS-1$
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/strategy/ContainmentBrowseStrategy.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/strategy/ContainmentBrowseStrategy.java
new file mode 100644
index 00000000000..889ca013750
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/strategy/ContainmentBrowseStrategy.java
@@ -0,0 +1,344 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.providers.strategy;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.facet.infra.facet.FacetReference;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.widgets.providers.IAdaptableContentProvider;
+import org.eclipse.papyrus.infra.widgets.strategy.ProviderBasedBrowseStrategy;
+import org.eclipse.swt.widgets.TreeItem;
+
+/**
+ * A TreeBrowseStrategy based on the semantic model.
+ * It can also retrieve a semantic element in a MoDisco tree, when the tree structure is close
+ * to the semantic one (With optional EReferences).
+ *
+ * Container1::Container2::EObject1 can be retrieved in a Tree representing
+ * Container1::(Reference1)::Container2::(Reference2)::EObject1
+ *
+ * @author Camille Letavernier
+ */
+public class ContainmentBrowseStrategy extends ProviderBasedBrowseStrategy {
+
+ protected IAdaptableContentProvider adaptableProvider;
+
+ protected TreeViewer viewer;
+
+ public ContainmentBrowseStrategy(ITreeContentProvider provider) {
+ if(!(provider instanceof IAdaptableContentProvider)) {
+ throw new IllegalArgumentException("The provider must be an IAdaptableContentProvider");
+ }
+
+ setProvider(provider);
+ this.adaptableProvider = (IAdaptableContentProvider)super.provider;
+ }
+
+ //
+ // Elements filtering
+ //
+
+ @Override
+ protected boolean browseElement(Object containerElement) {
+ Object semanticElement = adaptableProvider.getAdaptedValue(containerElement);
+
+ //Only browse Containment references and Facet references
+ if(semanticElement instanceof EReference) {
+ if(semanticElement instanceof FacetReference) {
+ return true;
+ }
+
+ return ((EReference)semanticElement).isContainment() && !((EReference)semanticElement).isDerived();
+ }
+
+ return true;
+ }
+
+ //
+ // Elements search
+ //
+
+ // /**
+ // * {@inheritDoc}
+ // */
+ // @Override
+ // public TreePath findPath(Object semanticElement, Object[] rootElements) {
+ // List<Object> semanticPath = new LinkedList<Object>();
+ // findSemanticPath(semanticElement, semanticPath);
+ // return searchPath(semanticPath, rootElements);
+ // }
+
+ // /**
+ // * Fills the semantic path to the given element
+ // *
+ // * @param element
+ // * The element to retrieve
+ // * @param currentPath
+ // * The path to fill (in-out)
+ // */
+ // protected void findSemanticPath(Object element, List<Object> currentPath) {
+ // if(element != null && element instanceof EObject) {
+ // findSemanticPath(getSemanticParent(element), currentPath);
+ // currentPath.add(element);
+ // }
+ // }
+ //
+ // protected Object getSemanticParent(Object element) {
+ // if(element instanceof EObject) {
+ // return ((EObject)element).eContainer();
+ // }
+ // return null;
+ // }
+ //
+ // /**
+ // * Retrieve the graphical TreePath from the given semantic path
+ // *
+ // * @param semanticPath
+ // * @return
+ // */
+ // protected TreePath searchPath(List<Object> semanticPath, Object input) {
+ // List<Object> graphicalPath = new LinkedList<Object>();
+ // Object[] graphicalRootObjects = (Object[])input;
+ // if(!searchPath(semanticPath, graphicalPath, graphicalRootObjects)) {
+ // //Object not found
+ // graphicalPath.clear();
+ // }
+ //
+ // return new TreePath(graphicalPath.toArray());
+ // }
+ //
+ // protected boolean searchPath(List<Object> semanticPath, List<Object> graphicalPath, Object[] graphicalRootObjects) {
+ // if(semanticPath.isEmpty()) {
+ // return true;
+ // }
+ //
+ // if(graphicalRootObjects == null) {
+ // return false;
+ // }
+ //
+ // Object currentElement = semanticPath.get(0);
+ // for(Object graphicalElement : graphicalRootObjects) {
+ // Object semanticValue = adaptableProvider.getAdaptedValue(graphicalElement);
+ //
+ // //Specific case for containment EReference
+ // if(semanticValue instanceof EReference) {
+ // EReference referenceToBrowse = (EReference)semanticValue;
+ // if(referenceToBrowse.isContainment()) {
+ // graphicalPath.add(graphicalElement);
+ //
+ // if(searchPath(semanticPath, graphicalPath, provider.getChildren(graphicalElement))) {
+ // //The element has been found
+ // return true;
+ // }
+ //
+ // //The element has not been found ; we revert the modifications
+ // graphicalPath.remove(graphicalElement);
+ // }
+ // }
+ //
+ // if(semanticValue == currentElement) {
+ // semanticPath.remove(0);
+ // graphicalPath.add(graphicalElement);
+ // if(searchPath(semanticPath, graphicalPath, provider.getChildren(graphicalElement))) {
+ // return true;
+ // }
+ // }
+ // }
+ //
+ // return false;
+ // }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ if(viewer instanceof TreeViewer) {
+ this.viewer = (TreeViewer)viewer;
+ }
+ super.inputChanged(viewer, oldInput, newInput);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void revealSemanticElement(List<?> elementList) {
+ //for each element we reveal it
+ Iterator<?> elementListIterator = elementList.iterator();
+ ArrayList<Object> treeElementToSelect = new ArrayList<Object>();
+ while(elementListIterator.hasNext()) {
+ Object currentElement = elementListIterator.next();
+ //test if the type is an EObject
+ if(currentElement instanceof EObject) {
+ EObject currentEObject = (EObject)currentElement;
+ //the content provider exist?
+ if(provider != null) {
+ //need the root in order to find all element in the tree
+ Object root = provider.getElements(null)[0];
+ //look for the path in order to access to this element
+ List<Object> path = searchPath(currentEObject, Arrays.asList(provider.getElements(root)));
+ if(path.size() > 0) {
+ //expand in the common viewer the path
+ expandItems(path, viewer.getTree().getItems());
+ treeElementToSelect.add(path.get(path.size() - 1));
+ }
+ }
+ }
+ selectReveal(new StructuredSelection(treeElementToSelect));
+ }
+ }
+
+ public void expandItems(List<Object> treeElementList, TreeItem[] list) {
+ //the treeElement has more tan one element
+ viewer.getTree().setRedraw(false);
+ if(treeElementList.size() > 0) {
+ for(int i = 0; i < list.length; i++) {
+ if(list[i].getData() != null && list[i].getData().equals(treeElementList.get(0))) {
+ if(treeElementList.size() > 1) {//Do no expand the last element
+ Object[] toexpand = { treeElementList.get(0) };
+ viewer.setExpandedElements(toexpand);
+ }
+ ArrayList<Object> tmpList = new ArrayList<Object>();
+ tmpList.addAll(treeElementList);
+ tmpList.remove(tmpList.get(0));
+ expandItems(tmpList, list[i].getItems());
+ }
+ }
+ }
+ viewer.getTree().setRedraw(true);
+ }
+
+ public void selectReveal(ISelection selection) {
+ if(viewer != null) {
+ viewer.setSelection(selection, true);
+ }
+ }
+
+ /**
+ * Simple search, based on containment references
+ *
+ * @param eobject
+ * @param objects
+ * @return
+ */
+ protected List<Object> searchDirectContainmentPath(EObject eobject, List<Object> wrappedElements) {
+ List<Object> path = new ArrayList<Object>();
+
+ List<EObject> emfPath = EMFHelper.getContainmentPath(eobject);
+
+ for(Object wrappedElement : wrappedElements) {
+ EObject element = EMFHelper.getEObject(wrappedElement);
+
+ if(eobject.equals(element)) {
+ //We found the leaf element
+ return Collections.singletonList(wrappedElement);
+ }
+
+ if(browseElementForDirectContainment(emfPath, element)) {
+ List<Object> wrappedChildren = Arrays.asList(provider.getChildren(wrappedElement));
+ List<Object> childPath = searchDirectContainmentPath(eobject, wrappedChildren);
+ if(!childPath.isEmpty()) {
+ //We (indirectly) found the leaf element
+ path.add(wrappedElement);
+ path.addAll(childPath);
+ break;
+ }
+ } //Else: dead end
+ }
+
+ return path;
+ }
+
+ protected boolean browseElementForDirectContainment(List<EObject> emfPath, EObject element) {
+ if(emfPath.contains(element)) {
+ return true;
+ }
+
+ if(element instanceof EReference) {
+ EReference reference = (EReference)element;
+ if(reference.isContainment() && !reference.isDerived()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * look for the path the list of element (from the content provider) to go the eObject
+ *
+ * @param eobject
+ * that we look for.
+ * @param objects
+ * a list of elements where eobject can be wrapped.
+ * @return the list of modelElementItem (from the root to the element that wrap the eobject)
+ */
+ protected List<Object> searchPath(EObject eobject, List<Object> objects) {
+ //Simple/quick search (Based on containment)
+ List<Object> path = searchDirectContainmentPath(eobject, objects);
+ if(!path.isEmpty()) {
+ return path;
+ }
+
+ //Advanced search
+ path = new ArrayList<Object>();
+
+ for(Object o : objects) {
+ // Search matches in this level
+ if(!(o instanceof Diagram)) {
+ if(eobject.equals(EMFHelper.getEObject(o))) {
+ path.add(o);
+ return path;
+ }
+ }
+
+ // Find childs only for feature container
+ for(int i = 0; i < provider.getChildren(o).length; i++) {
+ Object treeItem = provider.getChildren(o)[i];
+
+ List<Object> tmppath = new ArrayList<Object>();
+ Object element = EMFHelper.getEObject(treeItem);
+
+ if(browseElement(element)) {
+ List<Object> childs = new ArrayList<Object>();
+ childs.add(treeItem);
+ tmppath = searchPath(eobject, childs);
+ }
+
+ // if tmppath contains the wrapped eobject we have found the good path
+ if(tmppath.size() > 0) {
+ Object last = tmppath.get(tmppath.size() - 1);
+ EObject lastEObject = EMFHelper.getEObject(last);
+ if(eobject.equals(lastEObject)) {
+ path.add(o);
+ path.addAll(tmppath);
+ return path;
+ }
+ }
+ }
+ }
+
+ return new ArrayList<Object>();
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/strategy/SemanticEMFContentProvider.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/strategy/SemanticEMFContentProvider.java
new file mode 100644
index 00000000000..3dad19455c9
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/strategy/SemanticEMFContentProvider.java
@@ -0,0 +1,197 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.providers.strategy;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.facet.infra.browser.uicore.CustomizableModelContentProvider;
+import org.eclipse.emf.facet.infra.browser.uicore.CustomizationManager;
+import org.eclipse.papyrus.infra.emf.Activator;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.widgets.providers.IAdaptableContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+
+
+public class SemanticEMFContentProvider extends CustomizableModelContentProvider implements IAdaptableContentProvider, IHierarchicContentProvider, IStaticContentProvider {
+
+ protected EObject[] roots;
+
+ protected List<?> metaclasses = new LinkedList<Object>();
+
+ protected List<?> notWantedMetaclasses = new LinkedList<Object>();
+
+ protected EObject eObject;
+
+ protected EStructuralFeature feature;
+
+ protected AdapterFactory factory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ public SemanticEMFContentProvider(EObject editedEObject, EStructuralFeature feature, EObject[] roots, CustomizationManager customizationManager) {
+ super(customizationManager);
+ this.roots = roots;
+
+ configureMetaclasses(feature);
+
+ this.eObject = editedEObject;
+ this.feature = feature;
+ }
+
+ public SemanticEMFContentProvider(EObject editedEObject, EStructuralFeature feature, EObject[] roots) {
+ this(editedEObject, feature, roots, Activator.getDefault().getCustomizationManager());
+ }
+
+ protected void configureMetaclasses(EStructuralFeature feature) {
+ if(feature != null) {
+ setWantedMetaclasses(Collections.singletonList(feature.getEType()));
+ }
+ }
+
+ public SemanticEMFContentProvider(EObject editedEObject, EStructuralFeature feature) {
+ this(editedEObject, feature, findRoots(editedEObject));
+ }
+
+ public SemanticEMFContentProvider(EObject[] roots) {
+ this(null, null, roots);
+ }
+
+ public SemanticEMFContentProvider(EObject[] roots, CustomizationManager customizationManager) {
+ this(null, null, roots, customizationManager);
+ }
+
+ public SemanticEMFContentProvider(ResourceSet root) {
+ this(null, null, root);
+ }
+
+ public SemanticEMFContentProvider(EObject editedEObject, EStructuralFeature feature, ResourceSet root) {
+ this(editedEObject, feature, getRoots(root));
+ }
+
+ protected static EObject[] getRoots(ResourceSet root) {
+ List<EObject> roots = new LinkedList<EObject>();
+ if(root != null) {
+ for(Resource resource : root.getResources()) {
+ roots.addAll(resource.getContents());
+ }
+ }
+ return roots.toArray(new EObject[roots.size()]);
+ }
+
+ protected static EObject[] findRoots(EObject source) {
+
+ //The EObject is not contained in a resource : we return the top-level EObject
+ if(source.eResource() == null) {
+ while(source.eContainer() != null) {
+ source = source.eContainer();
+ }
+
+ return new EObject[]{ source };
+ }
+
+ //The resource is not contained in a resource set : we return the resource's contents
+ if(source.eResource().getResourceSet() == null) {
+ return source.eResource().getContents().toArray(new EObject[0]);
+ }
+
+ //We have a full resourceSet : we return its contents
+ return getRoots(source.eResource().getResourceSet());
+ }
+
+ @Override
+ public EObject[] getRootElements(final Object inputElement) {
+ return roots;
+ }
+
+ public Object getAdaptedValue(Object containerElement) {
+ return EMFHelper.getEObject(containerElement);
+ }
+
+ @Override
+ public boolean hasChildren(Object parent) {
+ //May be expensive
+ Object[] children = getChildren(parent);
+ return children != null && children.length > 0;
+ }
+
+ public boolean isValidValue(Object containerElement) {
+ // get the semantic object form the element
+ Object semanticObject = getAdaptedValue(containerElement);
+
+ //return false for EReference and non-semantic objects
+ if(semanticObject instanceof EReference || semanticObject == null) {
+ return false;
+ }
+
+ //Tests whether the element is compatible with at least one metaclass
+ if(metaclasses != null && !metaclasses.isEmpty()) {
+ boolean compatible = false;
+
+ for(Object metaclass : metaclasses) {
+ if(isCompatibleMetaclass(containerElement, metaclass)) {
+ compatible = true;
+ break;
+ }
+ }
+
+ if(!compatible) {
+ return false;
+ }
+ }
+
+ //If the element is compatible with at least one metaclass from notWanted, then it is not valid
+ for(Object metaclass : notWantedMetaclasses) {
+ if(isCompatibleMetaclass(containerElement, metaclass)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ protected boolean isCompatibleMetaclass(Object containerElement, Object metaclass) {
+ if(metaclass instanceof EClassifier) {
+ Object semanticElement = getAdaptedValue(containerElement);
+ return ((EClassifier)metaclass).isInstance(semanticElement);
+ }
+ return false;
+ }
+
+ public void setWantedMetaclasses(List<?> metaclasses) {
+ this.metaclasses = metaclasses;
+ }
+
+ public void setNotWantedMetaclasses(List<?> notWantedMetaclasses) {
+ this.notWantedMetaclasses = notWantedMetaclasses;
+ }
+
+ public Object[] getElements() {
+ return super.getElements(null);
+ }
+
+ public List<?> getWantedMetaclasses() {
+ return metaclasses;
+ }
+
+ public List<?> getNotWantedMetaclasses() {
+ return notWantedMetaclasses;
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/BusinessModelResolver.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/BusinessModelResolver.java
new file mode 100644
index 00000000000..eb840db7f3b
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/BusinessModelResolver.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2008 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.utils;
+
+
+/**
+ * This class allows to retrieve the business object from an object representing
+ * a graphical artifact in a diagram. Each diagram can register its resolver
+ * which will be added to the list of resolvers. Some common resolvers are
+ * already registered : gef.EditPart TODO Use extensions to register additional
+ * resolvers.
+ */
+//Refactoring 0.10: This class has been moved from infra.core to infra.emf.
+//It should be re-implemented as a Service.
+public class BusinessModelResolver {
+
+ /**
+ * The unique instance
+ */
+ public static BusinessModelResolver instance = new BusinessModelResolver();
+
+ public BusinessModelResolver() {
+
+ }
+
+ /**
+ * Get the business object associated to this object, if any. This method
+ * navigate throw the object if the object is an graphical artefact or a
+ * diagram artifact.
+ *
+ * @param object
+ * @return Object
+ */
+ public Object getBusinessModel(Object object) {
+ return EMFHelper.getEObject(object);
+ }
+
+ /**
+ * @return BusinessModelResolver
+ */
+ public static BusinessModelResolver getInstance() {
+ return instance;
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ConvertedValueContainer.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ConvertedValueContainer.java
new file mode 100644
index 00000000000..4760ce6be06
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ConvertedValueContainer.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+
+
+/**
+ *
+ * This class allows to store the value created for a pasted String AND a result status associated to this pasted String
+ *
+ * @param <T>
+ */
+
+public class ConvertedValueContainer<T> {
+
+ /**
+ * this field is used when the pasted value is monovalued
+ */
+ private final T value;
+
+ /**
+ * the resulting status of the parsing
+ */
+ private final IStatus status;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param realValue
+ * a monovalued Value (can be <code>null</code>)
+ * @param realListValue
+ * a collection value (can be <code>null</code>)
+ * @param status
+ * a status (can be <code>null</code>)
+ */
+ public ConvertedValueContainer(final T realValue, final IStatus status) {
+ this.value = realValue;
+ this.status = status;
+ Assert.isNotNull(status);
+ }
+
+
+
+ public final IStatus getStatus() {
+ return this.status;
+ }
+
+ /**
+ *
+ * @return
+ * the value
+ */
+ public final T getConvertedValue() {
+ return this.value;
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EClassNameComparator.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EClassNameComparator.java
new file mode 100644
index 00000000000..0d559144ede
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EClassNameComparator.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import java.text.Collator;
+import java.util.Comparator;
+
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * A class for comparing EClasses by name
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class EClassNameComparator implements Comparator<EClass> {
+
+ public int compare(EClass class1, EClass class2) {
+ if(class1 == null) {
+ return class2 == null ? 0 : -1;
+ }
+
+ return Collator.getInstance().compare(class1.getName(), class2.getName());
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFContants.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFContants.java
new file mode 100644
index 00000000000..86c9f1d40d2
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFContants.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+/**
+ * Thyis class defines some useful constants for EMF
+ *
+ * @author vl222926
+ *
+ */
+public class EMFContants {
+
+
+ private EMFContants() {
+ //to prevent instanciation
+ }
+
+ public static final String ESTRING = "EString";
+
+ public static final String EBOOLEAN = "EBoolean";
+
+ public static final String EINT = "EInt";
+
+ public static final String EDOUBLE = "EDouble";
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFHelper.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFHelper.java
new file mode 100644
index 00000000000..bdcc1864b2e
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFHelper.java
@@ -0,0 +1,744 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - filter out EObjects that are Resources (CDO)
+ * Christian W. Damus (CEA) - Support read-only state at object level (CDO)
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.facet.custom.ui.CustomizedContentProviderUtils;
+import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers;
+import org.eclipse.papyrus.infra.emf.Activator;
+import org.eclipse.papyrus.infra.tools.util.PlatformHelper;
+
+/**
+ * A Helper class for manipulating EMF Objects
+ *
+ * @author Camille Letavernier
+ */
+//TODO : Check implementations. Most of them are old and don't always match the specification
+public class EMFHelper {
+
+ /**
+ * Returns the EClass corresponding to the given nsUri and className
+ *
+ * @param nsUri
+ * The NSURI of the EClass' EPackage
+ * @param className
+ * The EClass' name
+ * @return
+ * The EClass instance, or null if the EClass couldn't be found
+ */
+ public static EClass getEClass(final String nsUri, final String className) {
+ EPackage ePackage = EPackage.Registry.INSTANCE.getEPackage(nsUri);
+ if(ePackage == null) {
+ Activator.log.warn("Cannot find an EPackage matching the nsURI " + nsUri); //$NON-NLS-1$
+ return null;
+ }
+ return getEClass(ePackage, className);
+ }
+
+ /**
+ * Return the EClass corresponding to the given EPackage and className
+ *
+ * @param metamodel
+ * The EClass' EPackage
+ * @param className
+ * The EClass' name
+ * @return
+ * The EClass instance, or null if the EClass couldn't be found
+ */
+ public static EClass getEClass(final EPackage metamodel, final String className) {
+ EClassifier classifier = metamodel.getEClassifier(className);
+ if(classifier == null) {
+ Activator.log.warn("Classifier " + className + " not found in metamodel " + metamodel.getName() + " (" + metamodel.getNsURI() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ }
+ if(classifier instanceof EClass) {
+ return (EClass)classifier;
+ } else {
+ Activator.log.warn("Classifier " + className + " in " + metamodel.getName() + " (" + metamodel.getNsURI() + ") is not an EClass"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ }
+
+ return null;
+ }
+
+ /**
+ * Tests if an Object is an instance of the given EClass
+ *
+ * @param element
+ * The EObject to test
+ * @param className
+ * The name of the EClass
+ * @param metamodel
+ * The EPackage owning the EClass
+ * @return
+ * True if the EObject is an instance of the EClass, or of one of the EClass' subtypes
+ */
+ public static boolean isInstance(final EObject element, final String className, final EPackage metamodel) {
+
+ EClassifier theClass = metamodel.getEClassifier(className);
+
+ if(theClass == null) {
+ Activator.log.warn("Class " + className + " not found in Metamodel : " + metamodel.getName() + " (" + metamodel.getNsURI() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ return false;
+ }
+
+ return theClass.isInstance(element);
+ }
+
+ /**
+ * Tests if the given eClass is a Subclass of fromClass
+ * Also returns true when eClass == fromClass
+ *
+ * @param eClass
+ * @param fromClass
+ * @return
+ * true if eClass is a subclass of fromClass
+ */
+ public static boolean isSubclass(final EClass eClass, final EClass fromClass) {
+ //Everything is an EObject
+ if(eClass != null && fromClass == EcorePackage.eINSTANCE.getEObject()) {
+ return true;
+ }
+
+ if(eClass == fromClass) {
+ return true;
+ }
+
+ List<EClass> superTypes = eClass.getEAllSuperTypes();
+ if(superTypes.contains(fromClass)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns the EObject corresponding to the input object
+ * Tests if the input is an EObject, or if it is Adaptable
+ * to an EObject
+ *
+ * @param source
+ * @return An EObject corresponding to the input source, or null
+ * if the EObject could not be resolved
+ */
+ public static EObject getEObject(final Object source) {
+
+ //Support for EMF 0.2 CustomizedTree: The TreeElements are EObjects, and do not implement IAdatapble.
+ //FIXME: Use an AdapterFactory instead, to remove the dependency to EMF Facet 0.2
+ Object resolved = CustomizedContentProviderUtils.resolve(source);
+ if(resolved != source && isEMFModelElement(resolved)) {
+ return (EObject)resolved;
+ }
+
+ //General case
+ if(isEMFModelElement(source)) {
+ return (EObject)source;
+ } else if(source instanceof IAdaptable) {
+ EObject eObject = (EObject)((IAdaptable)source).getAdapter(EObject.class);
+ if(eObject == null) { //EMF Facet 0.1
+ eObject = (EObject)((IAdaptable)source).getAdapter(EReference.class);
+ }
+ return asEMFModelElement(eObject); // in case the adapter is a CDOResource
+ }
+
+ return null;
+ }
+
+ /**
+ * Queries whether an {@code object} is an EMF model element, an instance of
+ * some {@link EClass} from an EMF model. This isn't as simple as checking
+ * whether the object is an {@link EObject} because there are edge cases
+ * where objects are {@code EObject}s but shouldn't be treated as
+ * "model content". But, a minimum requirement is that the {@code object} is
+ * an {@link EObject}.
+ *
+ * @param object
+ * an object
+ * @return whether it is "model content"
+ *
+ * @see EMFHelper#asEMFModelElement(Object)
+ */
+ public static boolean isEMFModelElement(Object object) {
+ return (object instanceof EObject) && !(object instanceof Resource);
+ }
+
+ /**
+ * Casts an {@code object} as an EMF model element, if appropriate.
+ *
+ * @param object
+ * an object
+ * @return the object as an EMF model element, or {@code null} if it is not
+ * an EMF model element
+ *
+ * @see #isEMFModelElement(Object)
+ */
+ public static EObject asEMFModelElement(Object object) {
+ return isEMFModelElement(object) ? (EObject)object : null;
+ }
+
+ /**
+ * Retrieve the EditingDomain for the given source object. The object is first
+ * resolved to an EObject through #getEObject when possible.
+ *
+ * @param source
+ * @return
+ * The source object's editing domain, or null if it couldn't be found
+ */
+ public static EditingDomain resolveEditingDomain(final Object source) {
+ return resolveEditingDomain(getEObject(source));
+ }
+
+ /**
+ * Retrieve the EditingDomain for the given source EObject
+ *
+ * @param source
+ * @return
+ * The source eObject's editing domain, or null if it couldn't be found
+ */
+ public static EditingDomain resolveEditingDomain(final EObject source) {
+ EditingDomain domain = AdapterFactoryEditingDomain.getEditingDomainFor(source);
+ if(domain == null) {
+ try {
+ domain = ServiceUtilsForActionHandlers.getInstance().getTransactionalEditingDomain();
+ } catch (ServiceException e) {
+ //Ignore: We cannot find the domain
+ }
+ }
+ return domain;
+ }
+
+ /**
+ * Return the eClassifier' qualified name. The qualified name is obtained by the concatenation
+ * of its package hierarchy with the class name, separated by the given separator
+ *
+ * @param eClassifier
+ * @param separator
+ * The separator used between each package name
+ * @return
+ * The EClassifier' qualified name
+ */
+ public static String getQualifiedName(final EClassifier eClassifier, final String separator) {
+ return getQualifiedName(eClassifier.getEPackage(), separator) + separator + eClassifier.getName();
+ }
+
+ /**
+ * Return the ePackage's qualified name. The qualified name is obtained by the concatenation
+ * of its superPackage hierarchy with the ePackage name, separated by the given separator
+ *
+ * @param ePackage
+ * @param separator
+ * The separator used between each package name
+ * @return
+ * The EPackage's qualified name
+ */
+ public static String getQualifiedName(final EPackage ePackage, final String separator) {
+ if(ePackage.getESuperPackage() == null) {
+ return ePackage.getName();
+ }
+ return getQualifiedName(ePackage.getESuperPackage(), separator) + separator + ePackage.getName();
+ }
+
+
+ /**
+ * Loads and returns the first EObject at the given URI.
+ * The EObject is loaded in the given resourceSet.
+ *
+ * @param resourceSet
+ * The ResourceSet in which the model will be loaded
+ * @param uri
+ * The URI describing the location of the model to load
+ * @return
+ * The first EObject located at the given URI
+ * @throws IOException
+ * When the URI cannot be loaded
+ */
+ public static EObject loadEMFModel(ResourceSet resourceSet, final URI uri) throws IOException {
+ if(resourceSet == null) {
+ resourceSet = new ResourceSetImpl();
+ }
+ try {
+ Resource resource = resourceSet.getResource(uri, true);
+ if(resource != null) {
+ if(!resource.getContents().isEmpty()) {
+ return resource.getContents().get(0);
+ }
+ }
+ } catch (Exception ex) {
+ IOException exception = new IOException(ex.toString());
+ exception.initCause(ex);
+ throw exception;
+ }
+
+ return null;
+ }
+
+ /**
+ * Return the root package containing the given package, or the package
+ * itself if it is already the root
+ *
+ * @param ePackage
+ * @return
+ * The Root package
+ */
+ public static EPackage getRootPackage(final EPackage ePackage) {
+ if(ePackage == null) {
+ return null;
+ }
+
+ if(ePackage.getESuperPackage() == null) {
+ return ePackage;
+ }
+ return getRootPackage(ePackage.getESuperPackage());
+ }
+
+
+ /**
+ * Return the list of EClasses that are subtypes
+ * of the given EClass
+ *
+ * @param type
+ * @param concreteClassesOnly
+ * If true, only Concrete EClasses will be returned. Abstract and Interface EClasses will be filtered
+ * @return
+ * The list of EClasses implementing or extending the given EClass
+ */
+ public static List<EClass> getSubclassesOf(final EClass type, final boolean concreteClassesOnly) {
+ Set<EClass> result = new LinkedHashSet<EClass>();
+ if(!concreteClassesOnly || (!type.isAbstract() && !type.isInterface())) {
+ result.add(type);
+ }
+
+ EPackage ePackage = getRootPackage(type.getEPackage());
+ getSubclassesOf(type, ePackage, result, concreteClassesOnly);
+ return new LinkedList<EClass>(result);
+ }
+
+ /**
+ * Return the list of EClasses that are sub types
+ * of the given EClass
+ *
+ * @param type
+ * @param concreteClassesOnly
+ * If true, only Concrete EClasses will be returned. Abstract and Interface EClasses will be filtered
+ * @param packagesToBrowse
+ * The EPackages in which the EClasses should be retrieved
+ * @return
+ * The list of EClasses implementing or extending the given EClass
+ */
+ public static List<EClass> getSubclassesOf(final EClass type, final boolean concreteClassesOnly, Collection<EPackage> packagesToBrowse) {
+ Set<EClass> result = new LinkedHashSet<EClass>();
+ if(!concreteClassesOnly || (!type.isAbstract() && !type.isInterface())) {
+ result.add(type);
+ }
+
+ for(EPackage ePackage : packagesToBrowse) {
+ getSubclassesOf(type, ePackage, result, concreteClassesOnly);
+ }
+
+ return new LinkedList<EClass>(result);
+ }
+
+ /**
+ * Return the list of EClasses that are sub types of the given EClass
+ *
+ * @param type
+ * @param concreteClassesOnly
+ * If true, only Concrete EClasses will be returned. Abstract and Interface EClasses will be filtered
+ * @param browseAllRegisteredPackages
+ * If true, all registered EPackages will be navigated to retrieve the matching EClasses. Otherwise,
+ * only the current EPackage will be used.
+ * @return
+ * The list of EClasses implementing or extending the given EClass
+ */
+ public static List<EClass> getSubclassesOf(final EClass type, final boolean concreteClassesOnly, final boolean browseAllRegisteredPackages) {
+ //If the current package is a dynamic package, it may not be registered (?). Add it directly
+ EPackage currentPackage = getRootPackage(type.getEPackage());
+
+ Set<EPackage> allPackages = new LinkedHashSet<EPackage>();
+ allPackages.add(currentPackage);
+
+ if(browseAllRegisteredPackages) {
+ //FIXME // WARNING: This loop will load all EPackages. The first call is expensive.
+ Set<String> allUris = new HashSet<String>(EPackage.Registry.INSTANCE.keySet());
+
+ for(String nsURI : allUris) {
+ allPackages.add(EPackage.Registry.INSTANCE.getEPackage(nsURI));
+ }
+ }
+
+ return getSubclassesOf(type, concreteClassesOnly, allPackages);
+ }
+
+ private static void getSubclassesOf(final EClass type, final EPackage fromPackage, final Set<EClass> result, final boolean concreteClassesOnly) {
+ for(EClassifier classifier : fromPackage.getEClassifiers()) {
+ if(classifier instanceof EClass) {
+ EClass eClass = (EClass)classifier;
+ if(eClass.getEAllSuperTypes().contains(type)) {
+ if(!concreteClassesOnly || (!eClass.isAbstract() && !eClass.isInterface())) {
+ result.add(eClass);
+ }
+ }
+ }
+ }
+
+ for(EPackage subPackage : fromPackage.getESubpackages()) {
+ getSubclassesOf(type, subPackage, result, concreteClassesOnly);
+ }
+ }
+
+ /**
+ * Tests if an EObject is read only
+ * Delegates to the EObject's editing domain if it can be found
+ *
+ * @param eObject
+ * @return
+ * True if the EObject is read only
+ */
+ public static boolean isReadOnly(final EObject eObject) {
+ EditingDomain domain = resolveEditingDomain(eObject);
+ return isReadOnly(eObject, domain);
+ }
+
+ /**
+ * Tests if an EObject is read only
+ * Delegates to the given editing domain if it isn't null
+ *
+ * @param eObject
+ *
+ * @param domain
+ * @return
+ * True if the EObject is read only
+ */
+ public static boolean isReadOnly(final EObject eObject, final EditingDomain domain) {
+ if(domain != null) {
+ Object handler = PlatformHelper.getAdapter(domain, IReadOnlyHandler.class);
+ if(handler instanceof IReadOnlyHandler) {
+ return ((IReadOnlyHandler)handler).isReadOnly(eObject).get();
+ }
+
+ if(eObject.eResource() != null) {
+ return domain.isReadOnly(eObject.eResource());
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Tests if the Resource is read only
+ * Delegates to the given editing domain if it isn't null
+ *
+ * @param resource
+ * @param domain
+ * @return
+ * True if the Resource is read only
+ */
+ public static boolean isReadOnly(final Resource resource, final EditingDomain domain) {
+ if(resource == null) {
+ return false;
+ }
+
+ if(domain != null && resource.getURI() != null) {
+ Object handler = PlatformHelper.getAdapter(domain, IReadOnlyHandler.class);
+ if(handler instanceof IReadOnlyHandler) {
+ return ((IReadOnlyHandler)handler).anyReadOnly(new URI[]{ resource.getURI() }).get();
+ }
+ return domain.isReadOnly(resource);
+ }
+
+ // no editing domain : use file system attribute
+ ResourceSet resourceSet = resource.getResourceSet();
+
+ if(resourceSet == null) {
+ return false;
+ }
+
+ Map<String, ?> attributes = resourceSet.getURIConverter().getAttributes(resource.getURI(), null);
+ Boolean readOnly = (Boolean)attributes.get(URIConverter.ATTRIBUTE_READ_ONLY);
+
+ return readOnly == null ? false : readOnly;
+ }
+
+ /**
+ * Tests if the given EStructuralFeature is required (ie. should always
+ * have a value)
+ *
+ * A feature is required if at least of one the following conditions if
+ * true :
+ *
+ * - It has a defaultValue
+ * - Its lowerBound is at least 1
+ * - It is an enumeration (Enumerations always have a default value)
+ * - It is a Java primitive type, and is not marked as Unsettable
+ *
+ * @param feature
+ * the feature to test
+ * @return
+ * true if the feature is required, false otherwise
+ */
+ public static boolean isRequired(final EStructuralFeature feature) {
+ //EEnums are always required, as an EEnum always has a default value
+ if(feature.getEType() instanceof EEnum) {
+ return true;
+ }
+
+ //At least one value means it is required
+ if(feature.getLowerBound() >= 1) {
+ return true;
+ }
+
+ //Java primitive types cannot have a null value
+ //if the feature is not specifically marked as unsettable, then it is required
+ if(feature.getEType().getInstanceClass().isPrimitive() && !feature.isUnsettable()) {
+ return true;
+ }
+
+ //If there is a default value, there is always a value
+ if(feature.getDefaultValueLiteral() != null) {
+ return true;
+ }
+
+ return false; //The property if not required
+ }
+
+ /**
+ * Returns all objects of type T contained in the resource
+ *
+ * @param resource
+ * @param type
+ * @return
+ */
+ public static <T> Set<T> allInstances(final Resource resource, Class<T> type) {
+ TreeIterator<EObject> iterator = resource.getAllContents();
+ Set<T> result = new LinkedHashSet<T>();
+
+ while(iterator.hasNext()) {
+ EObject element = iterator.next();
+ if(type.isInstance(element)) {
+ result.add(type.cast(element));
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Returns all the EPackages and nested EPackages contained in this resource
+ *
+ * @param resource
+ * @return
+ */
+ public static Set<EPackage> getAllEPackages(final Resource resource) {
+ Set<EPackage> result = new LinkedHashSet<EPackage>();
+
+ for(EObject rootElement : resource.getContents()) {
+ if(rootElement instanceof EPackage) {
+ result.add((EPackage)rootElement);
+ result.addAll(getAllNestedPackages((EPackage)rootElement));
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Returns all packages nested in the given EPackage (recursively). Does not
+ * include the base EPackage.
+ *
+ * @param basePackage
+ * @return
+ */
+ public static Set<EPackage> getAllNestedPackages(EPackage basePackage) {
+ Set<EPackage> result = new LinkedHashSet<EPackage>();
+
+ for(EPackage nestedPackage : basePackage.getESubpackages()) {
+ result.add(nestedPackage);
+ result.addAll(getAllNestedPackages(nestedPackage));
+ }
+
+ return result;
+ }
+
+ /**
+ *
+ * @param resource
+ * a resource
+ *
+ * @return
+ * the list of the metamodels known by the resource
+ */
+ public static Set<EPackage> getMetamodels(final Resource resource) {
+ Set<EPackage> metamodels = new HashSet<EPackage>();
+ if(resource != null) {
+ final List<EObject> contents = new ArrayList<EObject>(resource.getContents());
+ for(final EObject current : contents) {
+ metamodels.add(current.eClass().getEPackage());
+ }
+ }
+ return metamodels;
+ }
+
+ /**
+ *
+ * Returns the XMI ID of the given {@link EObject} or <code>null</code> if it cannot be resolved.
+ *
+ * @param object
+ * Object which we seek the XMI ID of.
+ * @return <code>object</code>'s XMI ID, <code>null</code> if not applicable.
+ */
+ public static final String getXMIID(final EObject object) {
+ String objectID = null;
+ if(object != null && object.eResource() instanceof XMIResource) {
+ objectID = ((XMIResource)object.eResource()).getID(object);
+ }
+ return objectID;
+ }
+
+
+
+ /**
+ * Gets the usages.
+ *
+ * @param source
+ * the source
+ *
+ * @return the usages or null if there is no usages
+ */
+ public static Collection<Setting> getUsages(EObject source) {
+ // the functional code is defined in core because we need it in infra.core
+ // but infra.core can't depend on infra.emf (circular dependency)
+ return org.eclipse.papyrus.infra.core.utils.EMFHelper.getUsages(source);
+ }
+
+
+ /**
+ * <pre>
+ * Test if the used element is referenced by other elements than the known
+ * referencer (except its container). It ignores references from an other meta-model.
+ * </pre>
+ *
+ * @param usedObject
+ * the used object
+ * @param knownReferencer
+ * the known referencer
+ * @return true if the known referencer is the only referencer.
+ */
+ public static boolean isOnlyUsage(EObject usedObject, EObject knownReferencer) {
+ boolean isUsed = false;
+ EPackage mmPackage = usedObject.eClass().getEPackage();
+
+ // Retrieve the list of elements referencing the usedObject.
+ Set<EObject> crossReferences = new HashSet<EObject>();
+ for(Setting setting : getUsages(usedObject)) {
+ EObject eObj = setting.getEObject();
+ if(eObj.eClass().getEPackage().equals(mmPackage)) {
+ crossReferences.add(eObj);
+ }
+ }
+
+ // Remove the container of used object.
+ crossReferences.remove(usedObject.eContainer());
+ // Remove the knownReferencer from the list of references.
+ crossReferences.remove(knownReferencer);
+
+ // If no referencer remains in the list, the known element is the only
+ // usage.
+ if(crossReferences.isEmpty()) {
+ isUsed = true;
+ }
+
+ return isUsed;
+ }
+
+ /**
+ *
+ * @param superType
+ * an eclassifier
+ * @param subType
+ * another eClassifier
+ * @return
+ * <code>true</code> if the 2nd {@link EClassifier} is a subtype of the first one
+ */
+ public static boolean isSuperType(final EClassifier superType, final EClassifier subType) {
+ if(superType == subType) {
+ return true;
+ }
+
+ if(superType instanceof EClass && subType instanceof EClass) {
+ // special case because isSuperTypeOf doesn't handle it
+ if(superType == EcorePackage.eINSTANCE.getEObject()) {
+ return true;
+ }
+
+ EClass superTypeEClass = (EClass)superType;
+ EClass subTypeEClass = (EClass)subType;
+ return superTypeEClass.isSuperTypeOf(subTypeEClass);
+ }
+
+ //manage EDtataType
+ if(superType == EcorePackage.eINSTANCE.getEDataType() && subType instanceof EDataType) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Computes the path from the root EObject to the given element, as a List of EObjects
+ *
+ * @param element
+ * @return
+ */
+ public static List<EObject> getContainmentPath(EObject element) {
+ List<EObject> result;
+ if(element.eContainer() == null) {
+ result = new LinkedList<EObject>();
+ result.add(element);
+ return result;
+ } else {
+ result = getContainmentPath(element.eContainer());
+ result.add(element);
+ }
+ return result;
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFStringValueConverter.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFStringValueConverter.java
new file mode 100644
index 00000000000..8f92a241737
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFStringValueConverter.java
@@ -0,0 +1,331 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.emf.Activator;
+import org.eclipse.papyrus.infra.tools.util.BooleanHelper;
+import org.eclipse.papyrus.infra.tools.util.TypesConstants;
+import org.eclipse.ui.services.IDisposable;
+
+/**
+ * Value solver for EMF
+ *
+ * WARNING : incomplete implementations
+ *
+ * @author vl222926
+ *
+ */
+
+public class EMFStringValueConverter implements IDisposable {
+
+ protected static final String THE_STRING_X_IS_NOT_VALID_TO_CREATE_Y = "The String {0} is not valid to create {1}";
+
+ protected static final String THE_FEATURE_X_CANT_BE_RESOLVED = "The feature {0} can't be resolved";
+
+ protected static final String THE_STRING_VALUE_X_CANT_BE_RESOLVED = "The string value {0} can't be resolved";
+
+ protected static final String SOME_STRING_ARE_NOT_VALID_TO_CREATE_X = "Some String are not valid to create {0}";
+
+ /**
+ * Context used for the resolution of the string
+ */
+ private EObject resolutionContext;
+
+ /**
+ * The separator used for multivalue
+ */
+ protected final String multiValueSeparator;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param resolutionContext
+ * the context used for the resolution of the string
+ */
+ public EMFStringValueConverter(final EObject resolutionContext, final String multiValueSeparator) {
+ this.resolutionContext = resolutionContext;
+ this.multiValueSeparator = multiValueSeparator;
+ }
+
+ /**
+ *
+ * @return
+ * the context to use for the resolution
+ */
+ public EObject getResolutionContext() {
+ return resolutionContext;
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.services.IDisposable#dispose()
+ *
+ */
+ public void dispose() {
+ this.resolutionContext = null;
+ }
+
+ /**
+ *
+ * @param resolutionContext
+ * the table context
+ * @param feature
+ * the feature
+ * @param valueAsString
+ * the pasted string for this feature
+ * @return
+ * the value for the pasted string or <code>null</code> if not found
+ */
+ public ConvertedValueContainer<?> deduceValueFromString(final Object feature, final String valueAsString) {
+ final EClassifier featureType = getFeatureType(feature);
+ if(feature instanceof EStructuralFeature) {
+ return deduceValueFromString(feature, featureType, valueAsString);
+ }
+ final IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, NLS.bind(THE_FEATURE_X_CANT_BE_RESOLVED, feature));
+ return new ConvertedValueContainer<Object>(null, status);
+ }
+
+ /**
+ *
+ * @param feature
+ * @param featureType
+ * @param valueAsString
+ * @return
+ */
+ protected ConvertedValueContainer<?> deduceValueFromString(final Object feature, final EClassifier featureType, final String valueAsString) {
+ ConvertedValueContainer<?> realValue = null;
+// if(feature instanceof EStructuralFeature) {
+ final int upperbound = getFeatureUpperBound(feature);
+ boolean isMany = (upperbound > 1 || upperbound == -1);
+ if(featureType instanceof EDataType) {
+ //move these strings
+ final String typeName = featureType.getName();
+ if(TypesConstants.STRING.equals(typeName) || EMFContants.ESTRING.equals(typeName)) {
+ realValue = deduceStringValue(isMany, valueAsString);
+ } else if(EMFContants.EBOOLEAN.equals(typeName) || TypesConstants.BOOLEAN.equals(typeName)) {
+ realValue = deduceBooleanValue(isMany, valueAsString);
+ } else if(EMFContants.EINT.equals(typeName) || TypesConstants.INTEGER.equals(typeName)) {
+ realValue = deduceIntValue(isMany, valueAsString);
+ } else if(EMFContants.EDOUBLE.equals(typeName)) {
+ realValue = deduceDoubleValue(isMany, valueAsString);
+ }
+ } else if(featureType instanceof EClass) {
+ realValue = deduceEObjectValue((EObject)getResolutionContext(), feature, (EClass)featureType, isMany, valueAsString);
+ }
+ // } else {
+ // final IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, NLS.bind(THE_STRING_VALUE_X_CANT_BE_RESOLVED, valueAsString));
+ // return new SolvedValueContainer<Object>(null, status);
+ // }
+ return realValue;
+ }
+
+ protected int getFeatureUpperBound(final Object feature) {
+ return ((EStructuralFeature)feature).getUpperBound();
+ }
+
+
+ /**
+ *
+ * @param resolutionContext
+ * the context used for the resolution
+ * @param feature
+ * the feature
+ * @param featureType
+ * the type of the feature
+ * @param isMany
+ * <code>true</code> if the feature isMany
+ * @param valueAsString
+ * the string value to resolve
+ * @return
+ * a value container referencing the eobject represented by the string
+ * @throws StringValueSolverException
+ */
+ protected ConvertedValueContainer<?> deduceEObjectValue(EObject resolutionContext, Object feature, EClass featureType, boolean isMany, String valueAsString) {
+ if(valueAsString==null || valueAsString.equals("")){
+ return new ConvertedValueContainer<EObject>(null, Status.OK_STATUS);
+ }
+ final IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, NLS.bind(THE_STRING_VALUE_X_CANT_BE_RESOLVED, valueAsString));
+ return new ConvertedValueContainer<EObject>(null, status);
+ }
+
+ /**
+ *
+ * @param feature
+ * an object representing a feature
+ * @return
+ * the type of the feature
+ */
+ protected EClassifier getFeatureType(final Object feature) {
+ final EClassifier featureType;
+ if(feature instanceof EStructuralFeature) {
+ return ((EStructuralFeature)feature).getEType();
+ } else {
+ featureType = null;
+ }
+ return featureType;
+ }
+
+ /**
+ *
+ * @param isMany
+ * <code>true</code> if the feature isMany
+ * @param valueAsString
+ * the value to parse
+ * @return
+ * the result of the parsing
+ */
+ protected ConvertedValueContainer<?> deduceBooleanValue(final boolean isMany, final String valueAsString) {
+ ConvertedValueContainer<?> returnedValue = null;
+ IStatus iStatus = Status.OK_STATUS;
+ final Collection<String> unresolvedValues = new ArrayList<String>();
+ if(isMany) {
+ final Collection<Boolean> values = new ArrayList<Boolean>();
+ for(final String str : valueAsString.split(this.multiValueSeparator)) {
+ if(BooleanHelper.isBoolean(str)) {
+ values.add(Boolean.valueOf(valueAsString));
+ } else {
+ unresolvedValues.add(str);
+ }
+ }
+ if(!unresolvedValues.isEmpty()) {
+ iStatus = new StringValueConverterStatus(IStatus.ERROR, Activator.PLUGIN_ID, NLS.bind(SOME_STRING_ARE_NOT_VALID_TO_CREATE_X, TypesConstants.BOOLEAN), unresolvedValues);
+ }
+ returnedValue = new MultiConvertedValueContainer<Boolean>(values, iStatus);
+ } else {
+ if(BooleanHelper.isBoolean(valueAsString)) {
+ returnedValue = new ConvertedValueContainer<Boolean>(Boolean.valueOf(valueAsString), iStatus);
+ } else {
+ unresolvedValues.add(valueAsString);
+ iStatus = new StringValueConverterStatus(IStatus.ERROR, Activator.PLUGIN_ID, NLS.bind(THE_STRING_X_IS_NOT_VALID_TO_CREATE_Y, valueAsString, TypesConstants.BOOLEAN), unresolvedValues);
+ returnedValue = new ConvertedValueContainer<Boolean>(null, iStatus);
+ }
+ }
+ return returnedValue;
+ }
+
+ /**
+ *
+ * @param isMany
+ * <code>true</code> if the feature isMany
+ * @param valueAsString
+ * the value to parse
+ * @return
+ * the result of the parsing
+ */
+ protected ConvertedValueContainer<?> deduceDoubleValue(final boolean isMany, final String valueAsString) {
+ ConvertedValueContainer<?> returnedValue = null;
+ IStatus iStatus = Status.OK_STATUS;
+ final Collection<String> unresolvedValues = new ArrayList<String>();
+ if(isMany) {
+ final Collection<Double> values = new ArrayList<Double>();
+ for(final String str : valueAsString.split(this.multiValueSeparator)) {
+ final Double value = Double.valueOf(str);
+ if(value != null) {
+ values.add(value);
+ } else {
+ unresolvedValues.add(str);
+ }
+ }
+ if(!unresolvedValues.isEmpty()) {
+ iStatus = new StringValueConverterStatus(IStatus.ERROR, Activator.PLUGIN_ID, NLS.bind(SOME_STRING_ARE_NOT_VALID_TO_CREATE_X, TypesConstants.DOUBLE), unresolvedValues);
+ }
+ returnedValue = new MultiConvertedValueContainer<Double>(values, iStatus);
+ } else {
+ try {
+ returnedValue = new ConvertedValueContainer<Double>(Double.valueOf(valueAsString), iStatus);
+ } catch (final NumberFormatException e) {
+ unresolvedValues.add(valueAsString);
+ iStatus = new StringValueConverterStatus(IStatus.ERROR, Activator.PLUGIN_ID, NLS.bind(THE_STRING_X_IS_NOT_VALID_TO_CREATE_Y, valueAsString, TypesConstants.DOUBLE), unresolvedValues);
+ returnedValue = new ConvertedValueContainer<Boolean>(null, iStatus);
+ }
+ }
+ return returnedValue;
+ }
+
+ /**
+ *
+ * @param isMany
+ * <code>true</code> if the feature isMany
+ * @param valueAsString
+ * the value to parse
+ * @return
+ * the result of the parsing
+ */
+ protected ConvertedValueContainer<?> deduceIntValue(final boolean isMany, final String valueAsString) {
+ ConvertedValueContainer<?> returnedValue = null;
+ IStatus iStatus = Status.OK_STATUS;
+ final Collection<String> unresolvedValues = new ArrayList<String>();
+ if(isMany) {
+ final Collection<Integer> values = new ArrayList<Integer>();
+ for(final String str : valueAsString.split(this.multiValueSeparator)) {
+ try {
+ values.add(Integer.valueOf(str));
+ } catch (final NumberFormatException e) {
+ unresolvedValues.add(str);
+ }
+ }
+ if(!unresolvedValues.isEmpty()) {
+ iStatus = new StringValueConverterStatus(IStatus.ERROR, Activator.PLUGIN_ID, NLS.bind(SOME_STRING_ARE_NOT_VALID_TO_CREATE_X, TypesConstants.INTEGER), unresolvedValues);
+ }
+ returnedValue = new MultiConvertedValueContainer<Integer>(values, iStatus);
+ } else {
+ try {
+ returnedValue = new ConvertedValueContainer<Integer>(Integer.valueOf(valueAsString), iStatus);
+ } catch (final NumberFormatException e) {
+ unresolvedValues.add(valueAsString);
+ iStatus = new StringValueConverterStatus(IStatus.ERROR, Activator.PLUGIN_ID, NLS.bind(THE_STRING_X_IS_NOT_VALID_TO_CREATE_Y, valueAsString, TypesConstants.INTEGER), unresolvedValues);
+ returnedValue = new ConvertedValueContainer<Boolean>(null, iStatus);
+ }
+ }
+ return returnedValue;
+ }
+
+
+ /**
+ *
+ * @param isMany
+ * <code>true</code> if the feature is many
+ * @param valueAsString
+ * the value as string
+ * @return
+ * the value container with the real value(s)
+ */
+ protected ConvertedValueContainer<?> deduceStringValue(final boolean isMany, final String valueAsString) {
+ ConvertedValueContainer<?> returnedValue = null;
+ final IStatus iStatus = Status.OK_STATUS;
+ if(isMany) {
+ final Collection<String> values = new ArrayList<String>();
+ for(final String str : valueAsString.split(this.multiValueSeparator)) {
+ values.add(str);
+ }
+ returnedValue = new MultiConvertedValueContainer<String>(values, iStatus);
+ } else {
+ returnedValue = new ConvertedValueContainer<String>(valueAsString, iStatus);
+ }
+ return returnedValue;
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ENamedElementComparator.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ENamedElementComparator.java
new file mode 100644
index 00000000000..f2928885c13
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ENamedElementComparator.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import java.text.Collator;
+import java.util.Comparator;
+
+import org.eclipse.emf.ecore.ENamedElement;
+
+/**
+ *
+ * A comparator for ENamedElement
+ *
+ */
+public class ENamedElementComparator implements Comparator<ENamedElement> {
+
+ public int compare(final ENamedElement namedElement1, final ENamedElement namedElement2) {
+ if(namedElement1 == null) {
+ return namedElement2 == null ? 0 : -1;
+ }
+
+ return Collator.getInstance().compare(namedElement1.getName(), namedElement2.getName());
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/HistoryUtil.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/HistoryUtil.java
new file mode 100644
index 00000000000..50d10a12b9f
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/HistoryUtil.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+
+public class HistoryUtil {
+
+ /**
+ * Returns a String identifying the History of selected values for the given object/feature
+ *
+ * @param editedObject
+ * @param feature
+ * @return
+ */
+ public static String getHistoryID(EObject editedObject, EStructuralFeature feature) {
+ return getHistoryID(editedObject, feature, "");
+ }
+
+ /**
+ * Returns a String identifying the History of selected values for the given object/feature,
+ * and prepends the given prefix
+ *
+ * @param editedObject
+ * @param feature
+ * @return
+ */
+ public static String getHistoryID(EObject editedObject, EStructuralFeature feature, String prefix) {
+ // return String.format("history_%s:%s:%s", feature.getEType().getEPackage().getName(), feature.getEType().getName(), feature.getName()); //$NON-NLS-1$
+ if(editedObject.eResource() == null) {
+ return String.format("history_%s_%s:%s", prefix, EMFHelper.getQualifiedName(feature.getEType(), ":"), feature.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ return String.format("history_%s_%s:%s:%s", prefix, editedObject.eResource().getURI(), EMFHelper.getQualifiedName(feature.getEType(), ":"), feature.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/MultiConvertedValueContainer.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/MultiConvertedValueContainer.java
new file mode 100644
index 00000000000..8cb52536ecd
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/MultiConvertedValueContainer.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import java.util.Collection;
+
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ *
+ * This class allows to store the value created for a pasted String AND a result status associated to this pasted String
+ *
+ * @param <T>
+ */
+public class MultiConvertedValueContainer<T> extends ConvertedValueContainer<Collection<T>> {
+
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param realValue
+ * @param status
+ */
+ public MultiConvertedValueContainer(final Collection<T> realValue, final IStatus status) {
+ super(realValue, status);
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ProviderHelper.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ProviderHelper.java
new file mode 100644
index 00000000000..d3d919225bd
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ProviderHelper.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.papyrus.infra.emf.providers.EMFGraphicalContentProvider;
+import org.eclipse.papyrus.infra.emf.providers.strategy.ContainmentBrowseStrategy;
+import org.eclipse.papyrus.infra.widgets.strategy.ProviderBasedBrowseStrategy;
+import org.eclipse.papyrus.infra.widgets.strategy.StrategyBasedContentProvider;
+import org.eclipse.papyrus.infra.widgets.strategy.TreeBrowseStrategy;
+
+
+public class ProviderHelper {
+
+ /**
+ * Encapsulates the given content provider in a higher-level content provider
+ * The returned provider uses two different strategies to display and search
+ * elements, and adds a pattern filter and an History
+ *
+ * @param provider
+ * The ContentProvider to encapsulate
+ * @return
+ */
+ public static EMFGraphicalContentProvider encapsulateProvider(ITreeContentProvider provider, ResourceSet resourceSet, String historyId) {
+ TreeBrowseStrategy browseStrategy = new ProviderBasedBrowseStrategy(provider);
+ TreeBrowseStrategy revealStrategy = new ContainmentBrowseStrategy(provider);
+ IStructuredContentProvider strategyProvider = new StrategyBasedContentProvider(browseStrategy, revealStrategy);
+ EMFGraphicalContentProvider graphicalProvider = new EMFGraphicalContentProvider(strategyProvider, resourceSet, historyId);
+
+ return graphicalProvider;
+ }
+
+ /**
+ * Encapsulates the given content provider in a higher-level content provider
+ * The returned provider uses two different strategies to display and search
+ * elements, and adds a pattern filter and an History
+ *
+ * @param provider
+ * The ContentProvider to encapsulate
+ * @return
+ */
+ public static EMFGraphicalContentProvider encapsulateProvider(ITreeContentProvider provider, EObject editedEObject, EStructuralFeature feature) {
+ ResourceSet rs = editedEObject == null ? null : editedEObject.eResource() == null ? null : editedEObject.eResource().getResourceSet();
+ return encapsulateProvider(provider, rs, HistoryUtil.getHistoryID(editedEObject, feature));
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ResourceUtils.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ResourceUtils.java
new file mode 100644
index 00000000000..225e5b57eae
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ResourceUtils.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+
+/**
+ *
+ * This class provides methods for EMF Resource
+ *
+ */
+public class ResourceUtils {
+
+ private ResourceUtils() {
+ //to prevent instanciation
+ }
+
+ /**
+ *
+ * @param resource
+ * an EMF resource
+ * @return
+ * the IFile corresponding to this resource, or <code>null</code> if not found
+ */
+ public static IFile getFile(final Resource resource) {
+ if(resource != null) {
+ URI uri = resource.getURI();
+ uri = resource.getResourceSet().getURIConverter().normalize(uri);
+ if(uri.isPlatformResource()) {
+ String uriPlatformString = uri.toPlatformString(true) ;
+ return ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(uriPlatformString));
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ *
+ * @param resource
+ * a resource
+ * @return
+ * a collection with all existing id in the resource
+ *
+ */
+ public static Collection<String> getAllResourceIds(final XMIResource resource) {
+ final Set<String> ids = new HashSet<String>();
+ final Iterator<EObject> iterator = resource.getAllContents();
+ while(iterator.hasNext()) {
+ final EObject current = iterator.next();
+ final String id = resource.getID(current);
+ Assert.isNotNull(id);
+ Assert.isTrue(!ids.contains(id));
+ ids.add(id);
+ }
+ return ids;
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceRegistryAdapterFactory.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceRegistryAdapterFactory.java
new file mode 100644
index 00000000000..596451c8444
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceRegistryAdapterFactory.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2012 Cedric Dumoulin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+
+/**
+ * This AdapterFactory is used to attach a reference on the ServiceRegiqtry to an EMF ResourceSet.
+ *
+ * This adapterFactory is not a real factory: no adapter is created.
+ *
+ * @author cedric dumoulin
+ *
+ */
+public class ServiceRegistryAdapterFactory extends AdapterFactoryImpl {
+
+ /**
+ * ID used to register the factory in the ResourceSet.
+ */
+ static final public String TYPE_ID = ServiceRegistryAdapterFactory.class.getName() + "TypeId";
+
+ /**
+ * The reference to the ServiceRegistry.
+ */
+ protected ServicesRegistry servicesRegistry;
+
+ /**
+ * @param servicesRegistry
+ */
+ public ServiceRegistryAdapterFactory(ServicesRegistry servicesRegistry) {
+ this.servicesRegistry = servicesRegistry;
+ }
+
+ /**
+ *
+ * @return the associated {@link ServicesRegistry}
+ */
+ public ServicesRegistry getServicesRegistry() {
+ return servicesRegistry;
+ }
+
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return type.equals(TYPE_ID);
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForEObject.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForEObject.java
new file mode 100644
index 00000000000..32e3b45d222
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForEObject.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.AbstractServiceUtils;
+
+/**
+ * A ServiceUtils instance for manipulating Papyrus services on an EObject
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class ServiceUtilsForEObject extends AbstractServiceUtils<EObject> {
+
+ private static ServiceUtilsForEObject instance = new ServiceUtilsForEObject();
+
+ public static ServiceUtilsForEObject getInstance() {
+ return instance;
+ }
+
+ private ServiceUtilsForEObject() {
+ //Singleton
+ }
+
+ @Override
+ public ServicesRegistry getServiceRegistry(EObject from) throws ServiceException {
+ if(from == null) {
+ throw new ServiceException("The selected EObject must not be null");
+ }
+
+ return ServiceUtilsForResource.getInstance().getServiceRegistry(from.eResource());
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForHandlers.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForHandlers.java
new file mode 100644
index 00000000000..cdf46c2d5be
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForHandlers.java
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServiceNotFoundException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.AbstractServiceUtils;
+import org.eclipse.ui.ISources;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartSite;
+
+/**
+ * ServicesUtils based on the Handler's ExecutionEvent
+ *
+ * It first tests the current selection, then the IWorkbenchPart on which the handler is executed.
+ * The IWorkbenchPart is expected to be adaptable to a ServiceRegistry.
+ *
+ * @author Camille Letavernier
+ *
+ * @see ServiceUtilsForSelection
+ */
+public class ServiceUtilsForHandlers extends AbstractServiceUtils<ExecutionEvent> {
+
+ private ServiceUtilsForHandlers() {
+ //Singleton
+ }
+
+ @Override
+ public ServicesRegistry getServiceRegistry(ExecutionEvent from) throws ServiceException {
+
+ Object context = from.getApplicationContext();
+
+ if(context instanceof IEvaluationContext) {
+ IEvaluationContext evaluationContext = (IEvaluationContext)context;
+
+ //Search for the IWorkbenchPartSite from which the ExecutionEvent is sent (May be different that the Active one)
+ Object workbenchPartSite = evaluationContext.getVariable("org.eclipse.ui.IWorkbenchPartSite");
+ if(workbenchPartSite instanceof IWorkbenchPartSite) {
+ IWorkbenchPartSite site = (IWorkbenchPartSite)workbenchPartSite;
+ Object registry = site.getAdapter(ServicesRegistry.class);
+ if(registry != null && registry instanceof ServicesRegistry) {
+ return (ServicesRegistry)registry;
+ }
+
+ //Search for the IWorkbenchPart from which the ExecutionEvent is sent (May be different that the Active one)
+ IWorkbenchPart workbenchPart = site.getPart();
+ registry = workbenchPart.getAdapter(ServicesRegistry.class);
+ if(registry != null && registry instanceof ServicesRegistry) {
+ return (ServicesRegistry)registry;
+ }
+ }
+
+ Object selection = evaluationContext.getVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME);
+
+ ServicesRegistry registry;
+
+ //Try to resolve the ServicesRegistry from the current selection
+ if(selection instanceof ISelection && !((ISelection)selection).isEmpty()) {
+ try {
+ registry = ServiceUtilsForSelection.getInstance().getServiceRegistry((ISelection)selection);
+ if(registry != null) {
+ return registry;
+ }
+ } catch (ServiceException ex) {
+ //Ignore and try another ServiceUtils
+ }
+ }
+
+ //We couldn't retrieve the ServiceRegistry from the current selection.
+
+ //Try to adapt the active part to the ServicesRegistry
+ IWorkbenchPart part = (IWorkbenchPart)evaluationContext.getVariable(ISources.ACTIVE_PART_NAME);
+ registry = (ServicesRegistry)(part).getAdapter(ServicesRegistry.class);
+ if(registry != null) {
+ return registry;
+ }
+ }
+
+ throw new ServiceNotFoundException("The ServiceRegistry cannot be resolved");
+ }
+
+ public static ServiceUtilsForHandlers getInstance() {
+ return instance;
+ }
+
+ private static final ServiceUtilsForHandlers instance = new ServiceUtilsForHandlers();
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForIEvaluationContext.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForIEvaluationContext.java
new file mode 100644
index 00000000000..183fd824911
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForIEvaluationContext.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * Copyright (c) 2012 Cedric Dumoulin.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServiceNotFoundException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.AbstractServiceUtils;
+import org.eclipse.ui.ISources;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartSite;
+
+/**
+ * ServicesUtils based on the Handler's IEvaluationContext.
+ * This class can be used for both the {@link AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)} and the {@link AbstractHandler#setEnabled(Object)} methods.
+ *
+ *
+ * @author Cedric Dumoulin
+ *
+ */
+public class ServiceUtilsForIEvaluationContext extends AbstractServiceUtils<IEvaluationContext> {
+
+ private ServiceUtilsForIEvaluationContext() {
+ //Singleton
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.core.utils.AbstractServiceUtils#getServiceRegistry(java.lang.Object)
+ *
+ * @param from
+ * @return
+ * @throws ServiceException
+ */
+ @Override
+ public ServicesRegistry getServiceRegistry(IEvaluationContext from) throws ServiceException {
+
+ IEvaluationContext evaluationContext = from;
+
+ //Search for the IWorkbenchPartSite from which the ExecutionEvent is sent (May be different that the Active one)
+ Object workbenchPartSite = evaluationContext.getVariable("org.eclipse.ui.IWorkbenchPartSite");
+ if(workbenchPartSite instanceof IWorkbenchPartSite) {
+ IWorkbenchPartSite site = (IWorkbenchPartSite)workbenchPartSite;
+ Object registry = site.getAdapter(ServicesRegistry.class);
+ if(registry != null && registry instanceof ServicesRegistry) {
+ return (ServicesRegistry)registry;
+ }
+
+ //Search for the IWorkbenchPart from which the ExecutionEvent is sent (May be different that the Active one)
+ IWorkbenchPart workbenchPart = site.getPart();
+ registry = workbenchPart.getAdapter(ServicesRegistry.class);
+ if(registry != null && registry instanceof ServicesRegistry) {
+ return (ServicesRegistry)registry;
+ }
+ }
+
+ Object selection = evaluationContext.getVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME);
+
+ ServicesRegistry registry;
+
+ //Try to resolve the ServicesRegistry from the current selection
+ if(selection instanceof ISelection && !((ISelection)selection).isEmpty()) {
+ try {
+ registry = ServiceUtilsForSelection.getInstance().getServiceRegistry((ISelection)selection);
+ if(registry != null) {
+ return registry;
+ }
+ } catch (ServiceException ex) {
+ //Ignore and try another ServiceUtils
+ }
+ }
+
+ //We couldn't retrieve the ServiceRegistry from the current selection.
+
+ //Try to adapt the active part to the ServicesRegistry
+ Object _part = evaluationContext.getVariable(ISources.ACTIVE_PART_NAME);
+ if (_part instanceof IWorkbenchPart) {
+ IWorkbenchPart part = (IWorkbenchPart)_part;
+ registry = (ServicesRegistry)(part).getAdapter(ServicesRegistry.class);
+ if(registry != null) {
+ return registry;
+ }
+ }
+
+
+ // nothing found
+ throw new ServiceNotFoundException("The ServiceRegistry cannot be resolved");
+ }
+
+ public static ServiceUtilsForIEvaluationContext getInstance() {
+ return instance;
+ }
+
+ private static final ServiceUtilsForIEvaluationContext instance = new ServiceUtilsForIEvaluationContext();
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForResource.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForResource.java
new file mode 100644
index 00000000000..0dc6349fd76
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForResource.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2012 Cedric Dumoulin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.utils;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServiceNotFoundException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.AbstractServiceUtils;
+
+/**
+ * Get the {@link ServicesRegistry} from a {@link EObject} or a {@link Resource}.
+ * This class allow to retrieve the {@link ServicesRegistry} associated to the {@link ResourceSet} owning the {@link Resource} owning the EObject.
+ *
+ * <br>
+ * To work properly, the EObject should be associated to a {@link Resource}, itself
+ * registered in a {@link ResourceSet}.
+ * Also, the ServicesRegistry should be associated to the ResourceSet with the help of the {@link ServiceRegistryAdapterFactory}. <br>
+ * Normally, this is automatically done thanks to the {@link ServiceUtilsForResourceInitializerService} service. <br>
+ * If you access this class from a service, you can ensure that the previous service is started by letting your service
+ * depends on the <b>org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceInitializerService</b>.
+ *
+ *
+ * @author cedric dumoulin
+ *
+ */
+public class ServiceUtilsForResource extends AbstractServiceUtils<Resource> {
+
+ private final static ServiceUtilsForResource instance = new ServiceUtilsForResource();
+
+ /**
+ * Get the singleton instance of the class.
+ *
+ * @return
+ */
+ public static final ServiceUtilsForResource getInstance() {
+ return instance;
+ }
+
+ /**
+ * Get the {@link ServicesRegistry} from a {@link Resource}.
+ *
+ * @param from
+ * The {@link Resource} from which we want the associated {@link ServicesRegistry}.
+ * @return
+ * @throws ServiceException
+ * If there is no {@link ServicesRegistry} associated to the {@link ResourceSet} owning the {@link Resource}.
+ */
+ @Override
+ public ServicesRegistry getServiceRegistry(Resource from) throws ServiceException {
+ if(from == null) {
+ throw new ServiceNotFoundException("Can't find the ResourceSet needed retrieve the ServiceRegistry.");
+ }
+ return ServiceUtilsForResourceSet.getInstance().getServiceRegistry(from.getResourceSet());
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForResourceInitializerService.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForResourceInitializerService.java
new file mode 100644
index 00000000000..25eba9bb364
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForResourceInitializerService.java
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ * Copyright (c) 2012 Cedric Dumoulin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.BadStateException;
+import org.eclipse.papyrus.infra.core.services.IService;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+
+/**
+ * This service register inside the ResourceSet an AdapterFactory referencing the ServiceRegistry.
+ * This will allows to get the ServicesRegistry from any EMF object (see {@link ServiceUtilsForResource}.
+ * The AdapterFactory can't provide Adapters. It is only used to hold a reference on the ServiceRegistry.
+ *
+ * This service depends on the ModelSet service.
+ *
+ *
+ * @see ServiceRegistryAdapterFactory
+ * @see ServiceUtilsForResource
+ *
+ * @author cedric dumoulin
+ *
+ */
+public class ServiceUtilsForResourceInitializerService implements IService {
+
+ ServicesRegistry servicesRegistry;
+
+ /**
+ * Create a {@link ServiceRegistryAdapterFactory} and associate it to the ResourceSet.
+ *
+ */
+ public void init(ServicesRegistry servicesRegistry) throws ServiceException {
+
+ this.servicesRegistry = servicesRegistry;
+ ModelSet modelSet = ServiceUtils.getInstance().getModelSet(servicesRegistry);
+
+ // Check if the Adapter Factory is already attached.
+ if( lookupServiceRegistryAdapterFactory(modelSet) != null ) {
+ return;
+ }
+
+ // Attach the adapter
+ ServiceRegistryAdapterFactory factory = new ServiceRegistryAdapterFactory(servicesRegistry);
+ modelSet.getAdapterFactories().add(factory);
+
+ }
+
+ /**
+ * Return the AdapterFactory, or null if none is found.
+ * @param resourceSet
+ * @return
+ */
+ private ServiceRegistryAdapterFactory lookupServiceRegistryAdapterFactory(ResourceSet resourceSet) {
+ ServiceRegistryAdapterFactory factory = (ServiceRegistryAdapterFactory)EcoreUtil.getAdapterFactory(resourceSet.getAdapterFactories(), ServiceRegistryAdapterFactory.TYPE_ID);
+
+ return factory;
+ }
+
+ /**
+ *
+ */
+ public void startService() throws ServiceException {
+ // Do nothing
+
+ }
+
+ /**
+ * Detach the Adapter from the resourceSet
+ */
+ public void disposeService() throws ServiceException {
+
+ try {
+ ModelSet modelSet = ServiceUtils.getInstance().getModelSet(servicesRegistry);
+ ServiceRegistryAdapterFactory factory = lookupServiceRegistryAdapterFactory(modelSet);
+
+ modelSet.getAdapterFactories().remove(factory);
+ } catch (BadStateException e) {
+ // ModelSet is already disposed. Do nothing
+ }
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForResourceSet.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForResourceSet.java
new file mode 100644
index 00000000000..7dd7c3d4d1d
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForResourceSet.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServiceNotFoundException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.AbstractServiceUtils;
+
+
+public class ServiceUtilsForResourceSet extends AbstractServiceUtils<ResourceSet> {
+
+ private ServiceUtilsForResourceSet() {
+ //Singleton
+ }
+
+ private static ServiceUtilsForResourceSet instance = new ServiceUtilsForResourceSet();
+
+ public static ServiceUtilsForResourceSet getInstance() {
+ return instance;
+ }
+
+ @Override
+ public ServicesRegistry getServiceRegistry(ResourceSet from) throws ServiceException {
+ if(from == null) {
+ throw new ServiceNotFoundException("Can't find the ResourceSet needed retrieve the ServiceRegistry.");
+ }
+
+ // An AdapterFactory referencing the ServiceRegistry is attache to the REsourceSet.
+ // Try to get it.
+ ServiceRegistryAdapterFactory factory = (ServiceRegistryAdapterFactory)EcoreUtil.getAdapterFactory(from.getAdapterFactories(), ServiceRegistryAdapterFactory.TYPE_ID);
+ if(factory == null) {
+ throw new ServiceNotFoundException("Can't find the ServiceRegistry. No Adapter is attached to the ResourceSet. Check if the proper service is ");
+ }
+ return factory.getServicesRegistry();
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForSelection.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForSelection.java
new file mode 100644
index 00000000000..729668d4160
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/ServiceUtilsForSelection.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.AbstractServiceUtils;
+
+/**
+ * ServiceUtils based on an ISelection.
+ *
+ * Expects an IStructuredSelection containing at least one EObject (It then relies on ServiceUtilsForEObject to retrieve the ServicesRegistry)
+ *
+ * @author Camille Letavernier
+ */
+public class ServiceUtilsForSelection extends AbstractServiceUtils<ISelection> {
+
+ private ServiceUtilsForSelection() {
+ //Singleton
+ }
+
+ private static ServiceUtilsForSelection instance = new ServiceUtilsForSelection();
+
+ public static ServiceUtilsForSelection getInstance() {
+ return instance;
+ }
+
+ @Override
+ public ServicesRegistry getServiceRegistry(ISelection from) throws ServiceException {
+ if(from instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection)from;
+ Iterator<?> selectionIterator = selection.iterator();
+ while(selectionIterator.hasNext()) {
+ Object selectedElement = selectionIterator.next();
+ EObject selectedEObject = EMFHelper.getEObject(selectedElement);
+ if(selectedEObject != null) {
+ return ServiceUtilsForEObject.getInstance().getServiceRegistry(selectedEObject);
+ }
+ }
+ }
+
+ throw new ServiceException("Cannot retrieve the ServiceRegistry");
+ }
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/StringValueConverterStatus.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/StringValueConverterStatus.java
new file mode 100644
index 00000000000..bcb738add8d
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/StringValueConverterStatus.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import java.util.Collection;
+
+import org.eclipse.core.runtime.Status;
+
+/**
+ * This status is used y the String Value solvers
+ *
+ * @author vl222926
+ *
+ */
+public class StringValueConverterStatus extends Status {
+
+ /**
+ * the list of the uresolved strings
+ */
+ private Collection<String> unresolvedString;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param severity
+ * the severity of the status
+ * @param pluginId
+ * the plugin id providing this status
+ * @param message
+ * the message for this status
+ * @param unresolvedString
+ * the list of the unresolved string
+ */
+ public StringValueConverterStatus(int severity, String pluginId, String message, Collection<String> unresolvedString) {
+ super(severity, pluginId, message);
+ this.unresolvedString = unresolvedString;
+ }
+
+
+ /**
+ *
+ * @return
+ * the list of the unresolved string
+ */
+ public final Collection<String> getUnresolvedString() {
+ return unresolvedString;
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/TextReferencesHelper.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/TextReferencesHelper.java
new file mode 100644
index 00000000000..e3ac8d92d7e
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/TextReferencesHelper.java
@@ -0,0 +1,218 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (camille.letavernier@cea.fr) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.emf.Activator;
+
+/**
+ * An abstract helper to replace references to EObjects (represented by their URI) with a label (related to this EObject).
+ *
+ * It is typically used to introduce dynamic references to object's labels in free text areas (e.g. in a description)
+ *
+ * The reference can be introduced with {@link #insertReference(EObject, String, int)}
+ *
+ * The parsed string can be retrieved with {@link #replaceReferences(String)}
+ *
+ * @author Camille Letavernier
+ *
+ */
+public abstract class TextReferencesHelper {
+
+ public static final String URI_CHARS = "[^#]"; //Almost everything is allowed in a URI. It's simpler to exclude the fragment separator
+
+ public static final String FRAGMENT_CHARS = "[-A-Za-z0-9_/]"; //In Papyrus this is sufficient. Do we need a more complex expression?
+
+ public static final String URI_REGEX = String.format("%s*#%s+", URI_CHARS, FRAGMENT_CHARS); //The base uri is optional. The fragment is required.
+
+ public static String UNKNOWN_ELEMENT = "UNKNOWN"; //Replacement text for unknown elements
+
+ public static String PROXY_ELEMENT = "PROXY"; //Replacement text for proxy elements
+
+ protected Resource baseResource;
+
+ protected ResourceSet resourceSet;
+
+ protected TextReferencesHelper() {
+ //Empty
+ }
+
+ /**
+ *
+ * @param baseResource
+ * The resource against which the link uris will be resolved
+ */
+ protected TextReferencesHelper(Resource baseResource) {
+
+ if(baseResource != null) {
+ this.baseResource = baseResource;
+ this.resourceSet = baseResource.getResourceSet();
+ }
+ }
+
+ /**
+ * Parses the specified text, and replace all references with their replacement String
+ *
+ * @param text
+ * @return
+ *
+ * @see {@link #getReplacement(EObject, String)}
+ */
+ public String replaceReferences(String text) {
+ if(text == null) {
+ return null;
+ }
+
+ if("".equals(text)) {
+ return text;
+ }
+
+ //Javadoc-like @link tag
+ String replaceRegex = String.format("\\{@link (%s)(\\|([^}]*))?\\}", URI_REGEX);
+
+ Pattern pattern = Pattern.compile(replaceRegex);
+ Matcher matcher = pattern.matcher(text);
+
+ String newText = text;
+
+ while(matcher.find()) {
+ String uriToReplace = matcher.group(1); //0 is the full pattern (e.g. {link myUri#myFragment}, 1 is the first group (e.g. myUri#myFragment)
+ String cachedValue = matcher.group(3); //group 2 is |CachedValue, group 3 is CachedValue
+
+ String replacement = decorate(getReplacement(uriToReplace, cachedValue));
+
+ newText = matcher.replaceFirst(replacement);
+ matcher = pattern.matcher(newText);
+ }
+
+ return newText;
+ }
+
+ /**
+ * Insert a reference to the given element in the specified text, at the specified position
+ *
+ * @param toElement
+ * The element to reference
+ * @param inText
+ * The text in which the reference must be inserted
+ * @param atPosition
+ * The position at which the reference must be inserted. 0 is the beginning, while text.length() is the end. For all "invalid" indexes (<0
+ * and > length()), the reference will be inserted at the end of the string
+ * @return
+ * The text containing the new reference
+ */
+ public String insertReference(EObject toElement, String inText, int atPosition) {
+ String result = inText;
+ if(inText == null) {
+ return null; //No change
+ }
+
+ if(toElement == null) {
+ return inText; //No change
+ }
+
+ //Use a Javadoc-like @link tag
+ URI elementURI = EcoreUtil.getURI(toElement);
+ if(baseResource != null) {
+ URI baseURI = baseResource.getURI();
+ if(baseURI != null) {
+ elementURI = elementURI.deresolve(baseURI);
+ }
+ }
+ String reference = "{@link " + elementURI + "}"; //The URI is already encoded
+
+ if(atPosition == 0) {
+ return reference + result; //At the beginning
+ }
+
+ if(atPosition < 0 || atPosition >= inText.length()) {
+ result += reference; //Insert at the end
+ } else {
+ //Hello, world
+ //The whitespace is the character at position 6. Insert the reference at position 7 to add it after the whitespace
+ //It will result in Hello, <Replacement>world
+ result = inText.substring(0, atPosition); //Include the "afterPosition" character
+ result += reference; //Add the reference
+ result += inText.substring(atPosition, inText.length()); //Complete the string (Exclude the afterPosition character, as it has already been copied in the first part of the result string)
+ }
+
+ return result;
+ }
+
+ /**
+ * Adds a (text) decoration to the replacement string.
+ * This can be used for e.g. html-based texts, to add tags around the replaced string
+ *
+ * The default implementation does nothing.
+ */
+ protected String decorate(String text) {
+ return text;
+ }
+
+ protected String getReplacement(String uriToReplace, String cachedValue) {
+ String uri, fragment;
+
+ if(baseResource == null || resourceSet == null || baseResource.getURI() == null) {
+ return UNKNOWN_ELEMENT;
+ }
+
+ if(uriToReplace.contains("#")) {
+ uri = uriToReplace.substring(0, uriToReplace.indexOf('#'));
+ fragment = uriToReplace.substring(uriToReplace.indexOf('#') + 1, uriToReplace.length());
+ } else {
+ return UNKNOWN_ELEMENT;
+ }
+
+ URI targetURI;
+
+ URI resourceURI;
+
+ resourceURI = baseResource.getURI();
+
+ targetURI = URI.createURI(uri); //The URI must already be encoded
+
+ targetURI = targetURI.resolve(resourceURI);
+
+ if(targetURI == null) {
+ return UNKNOWN_ELEMENT;
+ }
+
+ targetURI = targetURI.appendFragment(fragment);
+
+ return getReplacement(targetURI, cachedValue);
+ }
+
+ protected String getReplacement(URI uriToReplace, String cachedValue) {
+ try {
+ EObject targetElement = resourceSet.getEObject(uriToReplace, true);
+ return getReplacement(targetElement, cachedValue);
+ } catch (Exception ex) {
+ //Log the error? If it happens once, it will happen many times (after each refresh). The UNKNOWN keyword may be enough.
+ //This error happens when the reference is broken (e.g. an element has been deleted). This is a "normal" behavior
+ Activator.log.debug("An error occurred while loading the following URI: " + uriToReplace + ". The reference cannot be replaced");
+ }
+
+ return UNKNOWN_ELEMENT;
+ }
+
+ protected abstract String getReplacement(EObject elementToReplace, String cachedValue);
+
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/TransactionalUnsetter.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/TransactionalUnsetter.java
new file mode 100644
index 00000000000..1d4ab1791a6
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/TransactionalUnsetter.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.utils;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.emf.commands.UnsetCommand;
+
+/**
+ *
+ * This class allows to do unset on a feature using a command
+ *
+ */
+public class TransactionalUnsetter {
+
+
+ /**
+ * the source eobject
+ */
+ private final Command cmd;
+
+ /**
+ * the editing domain used for the command
+ */
+
+ private final TransactionalEditingDomain domain;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param source
+ * the eobject to modify
+ * @param feature
+ * the feature on which we want to do an unset
+ */
+ public TransactionalUnsetter(final EObject source, final EStructuralFeature feature) {
+ domain = (TransactionalEditingDomain)EMFHelper.resolveEditingDomain(source);
+ cmd = new UnsetCommand((TransactionalEditingDomain)domain, source, feature);
+ }
+
+ /**
+ * this method do the unset
+ */
+ public void doUnset() {
+ domain.getCommandStack().execute(cmd);
+ }
+}
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/.classpath b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/.classpath
new file mode 100644
index 00000000000..361578420b1
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/.project b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/.project
new file mode 100644
index 00000000000..478d1af40ce
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.nattable.model.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/META-INF/MANIFEST.MF b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..dcf31164296
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.provider,
+ org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider,
+ org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider,
+ org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider,
+ org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider,
+ org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider,
+ org.eclipse.papyrus.infra.nattable.model.nattable.provider
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.nattable.model;bundle-version="0.10.1"
+Bundle-Vendor: %providerName
+Bundle-Version: 0.10.1.qualifier
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin$Implementation
+Bundle-SymbolicName: org.eclipse.papyrus.infra.nattable.model.edit;singleton:=true
+
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/about.html b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/about.html
new file mode 100644
index 00000000000..598b3684879
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 12, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/build.properties b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/build.properties
new file mode 100644
index 00000000000..a6bfdff8b76
--- /dev/null
+++ b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.nattable.model.edit/build.properties
@@ -0,0 +1,22 @@
+# Copyri