Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/META-INF/MANIFEST.MF5
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_EStructuralFeatureValueFillingConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_FeatureAxisConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_IPasteConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_PasteEObjectConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedLabelConfiguration_FeatureLabelProviderConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedLabelConfiguration_ObjectLabelProviderConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_EObjectAxis.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_EStructuralFeatureAxis.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_FeatureIdAxis.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_ObjectIdAxis.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateLocalTableHeaderAxisConfiguration_axisManagerConfigurations_AxisManagerConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnAxisProviders_MasterObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnAxisProviders_SlaveObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnHeaderAxisConfiguration_TableHeaderAxisConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowAxisProviders_MasterObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowAxisProviders_SlaveObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowHeaderAxisConfiguration_TableHeaderAxisConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableHeaderAxisConfiguration_axisManagers_AxisManagerRepresentation.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_columnAxisProvidersHistory_MasterObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_columnAxisProvidersHistory_SlaveObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_localColumnHeaderAxisConfiguration_LocalTableHeaderAxisConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_localRowHeaderAxisConfiguration_LocalTableHeaderAxisConfiguration.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_rowAxisProvidersHistory_MasterObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_rowAxisProvidersHistory_SlaveObjectAxisProvider.gifbin0 -> 223 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/AxisManagerConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/AxisManagerRepresentation.gifbin0 -> 129 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EStructuralFeatureAxis.gifbin0 -> 129 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EStructuralFeatureValueFillingConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/FeatureAxisConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/FeatureIdAxis.gifbin0 -> 129 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/IPasteConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/LocalTableHeaderAxisConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/MasterObjectAxisProvider.gifbin0 -> 129 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/ObjectIdAxis.gifbin0 -> 129 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/PasteEObjectConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/SlaveObjectAxisProvider.gifbin0 -> 129 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/TableHeaderAxisConfiguration.gifbin0 -> 129 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties65
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/plugin.xml13
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/EObjectAxisItemProvider.java (renamed from sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/EObjectAxisItemProvider.java)31
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/EStructuralFeatureAxisItemProvider.java (renamed from sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/EMFFeatureValueAxisProviderItemProvider.java)36
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/FeatureAxisItemProvider.java204
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/FeatureIdAxisItemProvider.java145
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/IdAxisItemProvider.java205
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/NattableaxisItemProviderAdapterFactory.java281
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/ObjectAxisItemProvider.java204
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/ObjectIdAxisItemProvider.java145
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AbstractHeaderAxisConfigurationItemProvider.java (renamed from sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/AbstractTableConfigurationItemProvider.java)150
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AxisManagerConfigurationItemProvider.java203
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AxisManagerRepresentationItemProvider.java (renamed from sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/DefaultAxisConfigurationItemProvider.java)104
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/EStructuralFeatureValueFillingConfigurationItemProvider.java (renamed from sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/IdAxisItemProvider.java)51
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/FeatureAxisConfigurationItemProvider.java167
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/IPasteConfigurationItemProvider.java131
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/LocalTableHeaderAxisConfigurationItemProvider.java (renamed from sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AbstractAxisConfigurationItemProvider.java)56
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/NattableaxisconfigurationItemProviderAdapterFactory.java176
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/PasteEObjectConfigurationItemProvider.java176
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/TableHeaderAxisConfigurationItemProvider.java168
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/AbstractAxisProviderItemProvider.java102
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/AxisProviderItemProvider.java (renamed from sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/DefaultAxisProviderItemProvider.java)51
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/MasterObjectAxisProviderItemProvider.java153
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/NattableaxisproviderItemProviderAdapterFactory.java32
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/SlaveObjectAxisProviderItemProvider.java120
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/TableConfigurationItemProvider.java125
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/TableNamedElementItemProvider.java183
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/FeatureLabelProviderConfigurationItemProvider.java3
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/ILabelProviderConfigurationItemProvider.java (renamed from sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/AbstractTableCreationTesterItemProvider.java)15
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/ObjectLabelProviderConfigurationItemProvider.java36
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/NattableItemProviderAdapterFactory.java48
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/TableItemProvider.java123
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/META-INF/MANIFEST.MF8
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/obj16/NattableaxisModelFile.gifbin0 -> 346 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/wizban/NewNattableaxis.gifbin0 -> 2462 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/plugin.properties9
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/plugin.xml131
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/requirement.nattableconfiguration24
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisActionBarContributor.java437
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisEditor.java1806
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisModelWizard.java640
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/presentation/NattableaxisconfigurationEditor.java481
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/presentation/NattableaxisproviderEditor.java481
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/presentation/NattableconfigurationEditor.java481
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/presentation/NattablelabelproviderEditor.java481
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterEditor.java482
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterModelWizard.java3
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/presentation/NattableEditor.java1336
86 files changed, 7965 insertions, 2542 deletions
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/META-INF/MANIFEST.MF b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/META-INF/MANIFEST.MF
index 7684a9626c8..812591376d9 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/META-INF/MANIFEST.MF
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/META-INF/MANIFEST.MF
@@ -8,7 +8,8 @@ Bundle-Activator: org.eclipse.papyrus.infra.nattable.model.nattable.provider.Nat
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider,
+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,
@@ -18,5 +19,5 @@ 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;visibility:=reexport;bundle-version="0.10.0"
+ org.eclipse.papyrus.infra.nattable.model;bundle-version="0.10.0"
Bundle-ActivationPolicy: lazy
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_EStructuralFeatureValueFillingConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_EStructuralFeatureValueFillingConfiguration.gif
new file mode 100644
index 00000000000..c2326eff67c
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_EStructuralFeatureValueFillingConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_FeatureAxisConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_FeatureAxisConfiguration.gif
new file mode 100644
index 00000000000..fdabbc265f7
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_FeatureAxisConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_IPasteConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_IPasteConfiguration.gif
new file mode 100644
index 00000000000..dfe51cfa69b
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_IPasteConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_PasteEObjectConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_PasteEObjectConfiguration.gif
new file mode 100644
index 00000000000..3388fd398d0
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedAxisConfiguration_PasteEObjectConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedLabelConfiguration_FeatureLabelProviderConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedLabelConfiguration_FeatureLabelProviderConfiguration.gif
new file mode 100644
index 00000000000..7839cb59536
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedLabelConfiguration_FeatureLabelProviderConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedLabelConfiguration_ObjectLabelProviderConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedLabelConfiguration_ObjectLabelProviderConfiguration.gif
new file mode 100644
index 00000000000..c5dab99a76c
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAbstractHeaderAxisConfiguration_ownedLabelConfiguration_ObjectLabelProviderConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_EObjectAxis.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_EObjectAxis.gif
new file mode 100644
index 00000000000..5da9e2dfa83
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_EObjectAxis.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_EStructuralFeatureAxis.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_EStructuralFeatureAxis.gif
new file mode 100644
index 00000000000..85e79066b86
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_EStructuralFeatureAxis.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_FeatureIdAxis.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_FeatureIdAxis.gif
new file mode 100644
index 00000000000..3ee6d16ecec
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_FeatureIdAxis.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_ObjectIdAxis.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_ObjectIdAxis.gif
new file mode 100644
index 00000000000..8fc21667b15
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateAxisProvider_axis_ObjectIdAxis.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateLocalTableHeaderAxisConfiguration_axisManagerConfigurations_AxisManagerConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateLocalTableHeaderAxisConfiguration_axisManagerConfigurations_AxisManagerConfiguration.gif
new file mode 100644
index 00000000000..30d6c628f9c
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateLocalTableHeaderAxisConfiguration_axisManagerConfigurations_AxisManagerConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnAxisProviders_MasterObjectAxisProvider.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnAxisProviders_MasterObjectAxisProvider.gif
new file mode 100644
index 00000000000..4d51bba34ad
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnAxisProviders_MasterObjectAxisProvider.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnAxisProviders_SlaveObjectAxisProvider.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnAxisProviders_SlaveObjectAxisProvider.gif
new file mode 100644
index 00000000000..8526cb69d7e
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnAxisProviders_SlaveObjectAxisProvider.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnHeaderAxisConfiguration_TableHeaderAxisConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnHeaderAxisConfiguration_TableHeaderAxisConfiguration.gif
new file mode 100644
index 00000000000..c053c91fd2f
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_columnHeaderAxisConfiguration_TableHeaderAxisConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowAxisProviders_MasterObjectAxisProvider.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowAxisProviders_MasterObjectAxisProvider.gif
new file mode 100644
index 00000000000..4d51bba34ad
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowAxisProviders_MasterObjectAxisProvider.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowAxisProviders_SlaveObjectAxisProvider.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowAxisProviders_SlaveObjectAxisProvider.gif
new file mode 100644
index 00000000000..8526cb69d7e
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowAxisProviders_SlaveObjectAxisProvider.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowHeaderAxisConfiguration_TableHeaderAxisConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowHeaderAxisConfiguration_TableHeaderAxisConfiguration.gif
new file mode 100644
index 00000000000..c053c91fd2f
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableConfiguration_rowHeaderAxisConfiguration_TableHeaderAxisConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableHeaderAxisConfiguration_axisManagers_AxisManagerRepresentation.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableHeaderAxisConfiguration_axisManagers_AxisManagerRepresentation.gif
new file mode 100644
index 00000000000..3e4fc3f72c3
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTableHeaderAxisConfiguration_axisManagers_AxisManagerRepresentation.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_columnAxisProvidersHistory_MasterObjectAxisProvider.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_columnAxisProvidersHistory_MasterObjectAxisProvider.gif
new file mode 100644
index 00000000000..7b5823c27e1
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_columnAxisProvidersHistory_MasterObjectAxisProvider.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_columnAxisProvidersHistory_SlaveObjectAxisProvider.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_columnAxisProvidersHistory_SlaveObjectAxisProvider.gif
new file mode 100644
index 00000000000..3799bd45b69
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_columnAxisProvidersHistory_SlaveObjectAxisProvider.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_localColumnHeaderAxisConfiguration_LocalTableHeaderAxisConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_localColumnHeaderAxisConfiguration_LocalTableHeaderAxisConfiguration.gif
new file mode 100644
index 00000000000..407220bf47e
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_localColumnHeaderAxisConfiguration_LocalTableHeaderAxisConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_localRowHeaderAxisConfiguration_LocalTableHeaderAxisConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_localRowHeaderAxisConfiguration_LocalTableHeaderAxisConfiguration.gif
new file mode 100644
index 00000000000..407220bf47e
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_localRowHeaderAxisConfiguration_LocalTableHeaderAxisConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_rowAxisProvidersHistory_MasterObjectAxisProvider.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_rowAxisProvidersHistory_MasterObjectAxisProvider.gif
new file mode 100644
index 00000000000..7b5823c27e1
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_rowAxisProvidersHistory_MasterObjectAxisProvider.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_rowAxisProvidersHistory_SlaveObjectAxisProvider.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_rowAxisProvidersHistory_SlaveObjectAxisProvider.gif
new file mode 100644
index 00000000000..3799bd45b69
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/ctool16/CreateTable_rowAxisProvidersHistory_SlaveObjectAxisProvider.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/AxisManagerConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/AxisManagerConfiguration.gif
new file mode 100644
index 00000000000..53500daf98e
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/AxisManagerConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/AxisManagerRepresentation.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/AxisManagerRepresentation.gif
new file mode 100644
index 00000000000..89ad5da38ab
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/AxisManagerRepresentation.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EStructuralFeatureAxis.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EStructuralFeatureAxis.gif
new file mode 100644
index 00000000000..c4a8af41844
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EStructuralFeatureAxis.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EStructuralFeatureValueFillingConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EStructuralFeatureValueFillingConfiguration.gif
new file mode 100644
index 00000000000..89ad5da38ab
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/EStructuralFeatureValueFillingConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/FeatureAxisConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/FeatureAxisConfiguration.gif
new file mode 100644
index 00000000000..739ebbfa6ac
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/FeatureAxisConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/FeatureIdAxis.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/FeatureIdAxis.gif
new file mode 100644
index 00000000000..94c953e013b
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/FeatureIdAxis.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/IPasteConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/IPasteConfiguration.gif
new file mode 100644
index 00000000000..9250fecbffd
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/IPasteConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/LocalTableHeaderAxisConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/LocalTableHeaderAxisConfiguration.gif
new file mode 100644
index 00000000000..94c953e013b
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/LocalTableHeaderAxisConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/MasterObjectAxisProvider.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/MasterObjectAxisProvider.gif
new file mode 100644
index 00000000000..904159880b3
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/MasterObjectAxisProvider.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/ObjectIdAxis.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/ObjectIdAxis.gif
new file mode 100644
index 00000000000..9250fecbffd
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/ObjectIdAxis.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/PasteEObjectConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/PasteEObjectConfiguration.gif
new file mode 100644
index 00000000000..a26660ec28f
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/PasteEObjectConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/SlaveObjectAxisProvider.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/SlaveObjectAxisProvider.gif
new file mode 100644
index 00000000000..33a997a1606
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/SlaveObjectAxisProvider.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/TableHeaderAxisConfiguration.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/TableHeaderAxisConfiguration.gif
new file mode 100644
index 00000000000..30f0c48da8d
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/icons/full/obj16/TableHeaderAxisConfiguration.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties
index 3bd92a59a07..f1cc4f628b0 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/plugin.properties
@@ -126,3 +126,68 @@ _UI_JavaTableCreationTester_tester_feature = Tester
_UI_AbstractTableTester_type = Abstract Table Tester
_UI_JavaTableTester_type = Java Table Tester
_UI_JavaTableTester_tester_feature = Tester
+_UI_TableNamedElement_type = Table Named Element
+_UI_IMasterAxisProvider_type = IMaster Axis Provider
+_UI_ISlaveAxisProvider_type = ISlave Axis Provider
+_UI_AxisProvider_type = Axis Provider
+_UI_SlaveObjectAxisProvider_type = Slave Object Axis Provider
+_UI_MasterObjectAxisProvider_type = Master Object Axis Provider
+_UI_ILabelProviderConfiguration_type = ILabel Provider Configuration
+_UI_AbstractHeaderAxisConfiguration_type = Abstract Header Axis Configuration
+_UI_AxisManagerRepresentation_type = Axis Manager Representation
+_UI_AxisManagerConfiguration_type = Axis Manager Configuration
+_UI_TableHeaderAxisConfiguration_type = Table Header Axis Configuration
+_UI_LocalTableHeaderAxisConfiguration_type = Local Table Header Axis Configuration
+_UI_IAxisConfiguration_type = IAxis Configuration
+_UI_FeatureAxisConfiguration_type = Feature Axis Configuration
+_UI_IFillingConfiguration_type = IFilling Configuration
+_UI_EStructuralFeatureValueFillingConfiguration_type = EStructural Feature Value Filling Configuration
+_UI_IPasteConfiguration_type = IPaste Configuration
+_UI_PasteEObjectConfiguration_type = Paste EObject Configuration
+_UI_FeatureAxis_type = Feature Axis
+_UI_ObjectAxis_type = Object Axis
+_UI_FeatureIdAxis_type = Feature Id Axis
+_UI_EStructuralFeatureAxis_type = EStructural Feature Axis
+_UI_ObjectIdAxis_type = Object Id Axis
+_UI_Table_tableConfiguration_feature = Table Configuration
+_UI_Table_columnAxisProvidersHistory_feature = Column Axis Providers History
+_UI_Table_rowAxisProvidersHistory_feature = Row Axis Providers History
+_UI_Table_localRowHeaderAxisConfiguration_feature = Local Row Header Axis Configuration
+_UI_Table_localColumnHeaderAxisConfiguration_feature = Local Column Header Axis Configuration
+_UI_Table_currentRowAxisProvider_feature = Current Row Axis Provider
+_UI_Table_currentColumnAxisProvider_feature = Current Column Axis Provider
+_UI_TableNamedElement_description_feature = Description
+_UI_TableNamedElement_name_feature = Name
+_UI_TableConfiguration_cellEditorDeclaration_feature = Cell Editor Declaration
+_UI_TableConfiguration_rowHeaderAxisConfiguration_feature = Row Header Axis Configuration
+_UI_TableConfiguration_columnHeaderAxisConfiguration_feature = Column Header Axis Configuration
+_UI_TableConfiguration_columnAxisProviders_feature = Column Axis Providers
+_UI_TableConfiguration_rowAxisProviders_feature = Row Axis Providers
+_UI_TableConfiguration_defaultRowAxisProvider_feature = Default Row Axis Provider
+_UI_TableConfiguration_defaultColumnAxisProvider_feature = Default Column Axis Provider
+_UI_IMasterAxisProvider_disconnectSlave_feature = Disconnect Slave
+_UI_AxisProvider_axis_feature = Axis
+_UI_AbstractHeaderAxisConfiguration_indexStyle_feature = Index Style
+_UI_AbstractHeaderAxisConfiguration_displayLabel_feature = Display Label
+_UI_AbstractHeaderAxisConfiguration_displayFilter_feature = Display Filter
+_UI_AbstractHeaderAxisConfiguration_displayIndex_feature = Display Index
+_UI_AbstractHeaderAxisConfiguration_ownedLabelConfiguration_feature = Owned Label Configuration
+_UI_AbstractHeaderAxisConfiguration_ownedAxisConfiguration_feature = Owned Axis Configuration
+_UI_AxisManagerRepresentation_axisManagerId_feature = Axis Manager Id
+_UI_AxisManagerRepresentation_labelProviderContext_feature = Label Provider Context
+_UI_AxisManagerRepresentation_headerLabelConfiguration_feature = Header Label Configuration
+_UI_AxisManagerRepresentation_specificAxisConfiguration_feature = Specific Axis Configuration
+_UI_AxisManagerConfiguration_localHeaderLabelConfiguration_feature = Local Header Label Configuration
+_UI_AxisManagerConfiguration_axisManager_feature = Axis Manager
+_UI_AxisManagerConfiguration_localSpecificConfiguration_feature = Local Specific Configuration
+_UI_TableHeaderAxisConfiguration_axisManagers_feature = Axis Managers
+_UI_LocalTableHeaderAxisConfiguration_axisManagerConfigurations_feature = Axis Manager Configurations
+_UI_FeatureAxisConfiguration_showOnlyCommonFeature_feature = Show Only Common Feature
+_UI_EStructuralFeatureValueFillingConfiguration_listenFeature_feature = Listen Feature
+_UI_PasteEObjectConfiguration_pastedElementId_feature = Pasted Element Id
+_UI_PasteEObjectConfiguration_pasteElementContainementFeature_feature = Paste Element Containement Feature
+_UI_IAxis_manager_feature = Manager
+_UI_IAxis_alias_feature = Alias
+_UI_FeatureAxis_localLabelConfiguration_feature = Local Label Configuration
+_UI_ObjectAxis_localLabelConfiguration_feature = Local Label Configuration
+_UI_EStructuralFeatureAxis_element_feature = Element
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/plugin.xml b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/plugin.xml
index a91f452c16c..bea95126aa4 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/plugin.xml
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/plugin.xml
@@ -94,4 +94,17 @@
org.eclipse.emf.edit.provider.IItemPropertySource"/>
</extension>
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <!-- @generated nattable -->
+ <factory
+ uri="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis"
+ class="org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.provider.NattableaxisItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"/>
+ </extension>
+
</plugin>
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/EObjectAxisItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/EObjectAxisItemProvider.java
index dcf96ed1a80..c9de5aa88b6 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/EObjectAxisItemProvider.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/EObjectAxisItemProvider.java
@@ -10,7 +10,7 @@
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
*/
-package org.eclipse.papyrus.infra.nattable.model.nattable.provider;
+package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.provider;
import java.util.Collection;
@@ -19,10 +19,6 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.ecore.provider.EModelElementItemProvider;
-
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -31,16 +27,17 @@ import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisPackage;
/**
- * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.EObjectAxis} object.
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectAxis} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class EObjectAxisItemProvider
- extends EModelElementItemProvider
+ extends ObjectAxisItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
@@ -86,7 +83,7 @@ public class EObjectAxisItemProvider
getResourceLocator(),
getString("_UI_EObjectAxis_element_feature"), //$NON-NLS-1$
getString("_UI_PropertyDescriptor_description", "_UI_EObjectAxis_element_feature", "_UI_EObjectAxis_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattablePackage.Literals.EOBJECT_AXIS__ELEMENT,
+ NattableaxisPackage.Literals.EOBJECT_AXIS__ELEMENT,
true,
false,
true,
@@ -114,7 +111,10 @@ public class EObjectAxisItemProvider
*/
@Override
public String getText(Object object) {
- return getString("_UI_EObjectAxis_type"); //$NON-NLS-1$
+ String label = ((EObjectAxis)object).getAlias();
+ return label == null || label.length() == 0 ?
+ getString("_UI_EObjectAxis_type") : //$NON-NLS-1$
+ getString("_UI_EObjectAxis_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -142,15 +142,4 @@ public class EObjectAxisItemProvider
super.collectNewChildDescriptors(newChildDescriptors, object);
}
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return NattableEditPlugin.INSTANCE;
- }
-
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/EMFFeatureValueAxisProviderItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/EStructuralFeatureAxisItemProvider.java
index f9f834cb350..f71972af22b 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/EMFFeatureValueAxisProviderItemProvider.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/EStructuralFeatureAxisItemProvider.java
@@ -10,7 +10,7 @@
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
*/
-package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider;
+package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.provider;
import java.util.Collection;
@@ -27,17 +27,17 @@ import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.EMFFeatureValueAxisProvider;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisPackage;
/**
- * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.EMFFeatureValueAxisProvider} object.
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
-public class EMFFeatureValueAxisProviderItemProvider
- extends DefaultAxisProviderItemProvider
+public class EStructuralFeatureAxisItemProvider
+ extends FeatureAxisItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
@@ -50,7 +50,7 @@ public class EMFFeatureValueAxisProviderItemProvider
* <!-- end-user-doc -->
* @generated
*/
- public EMFFeatureValueAxisProviderItemProvider(AdapterFactory adapterFactory) {
+ public EStructuralFeatureAxisItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
@@ -65,25 +65,25 @@ public class EMFFeatureValueAxisProviderItemProvider
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
- addListenFeaturePropertyDescriptor(object);
+ addElementPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
- * This adds a property descriptor for the Listen Feature feature.
+ * This adds a property descriptor for the Element feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addListenFeaturePropertyDescriptor(Object object) {
+ protected void addElementPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_EMFFeatureValueAxisProvider_listenFeature_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_EMFFeatureValueAxisProvider_listenFeature_feature", "_UI_EMFFeatureValueAxisProvider_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattableaxisproviderPackage.Literals.EMF_FEATURE_VALUE_AXIS_PROVIDER__LISTEN_FEATURE,
+ getString("_UI_EStructuralFeatureAxis_element_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_EStructuralFeatureAxis_element_feature", "_UI_EStructuralFeatureAxis_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisPackage.Literals.ESTRUCTURAL_FEATURE_AXIS__ELEMENT,
true,
false,
true,
@@ -93,14 +93,14 @@ public class EMFFeatureValueAxisProviderItemProvider
}
/**
- * This returns EMFFeatureValueAxisProvider.gif.
+ * This returns EStructuralFeatureAxis.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/EMFFeatureValueAxisProvider")); //$NON-NLS-1$
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/EStructuralFeatureAxis")); //$NON-NLS-1$
}
/**
@@ -111,10 +111,10 @@ public class EMFFeatureValueAxisProviderItemProvider
*/
@Override
public String getText(Object object) {
- String label = ((EMFFeatureValueAxisProvider)object).getPastedElementTypeId();
+ String label = ((EStructuralFeatureAxis)object).getAlias();
return label == null || label.length() == 0 ?
- getString("_UI_EMFFeatureValueAxisProvider_type") : //$NON-NLS-1$
- getString("_UI_EMFFeatureValueAxisProvider_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ getString("_UI_EStructuralFeatureAxis_type") : //$NON-NLS-1$
+ getString("_UI_EStructuralFeatureAxis_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/FeatureAxisItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/FeatureAxisItemProvider.java
new file mode 100644
index 00000000000..9f77133f9a8
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/FeatureAxisItemProvider.java
@@ -0,0 +1,204 @@
+/**
+ * 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.nattable.model.nattable.nattableaxis.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.FeatureAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisPackage;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.FeatureAxis} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FeatureAxisItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FeatureAxisItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addManagerPropertyDescriptor(object);
+ addAliasPropertyDescriptor(object);
+ addLocalLabelConfigurationPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Manager feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addManagerPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_IAxis_manager_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_IAxis_manager_feature", "_UI_IAxis_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisPackage.Literals.IAXIS__MANAGER,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Alias feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAliasPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_IAxis_alias_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_IAxis_alias_feature", "_UI_IAxis_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisPackage.Literals.IAXIS__ALIAS,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Local Label Configuration feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLocalLabelConfigurationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_FeatureAxis_localLabelConfiguration_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_FeatureAxis_localLabelConfiguration_feature", "_UI_FeatureAxis_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisPackage.Literals.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((FeatureAxis)object).getAlias();
+ return label == null || label.length() == 0 ?
+ getString("_UI_FeatureAxis_type") : //$NON-NLS-1$
+ getString("_UI_FeatureAxis_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(FeatureAxis.class)) {
+ case NattableaxisPackage.FEATURE_AXIS__ALIAS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return NattableEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/FeatureIdAxisItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/FeatureIdAxisItemProvider.java
new file mode 100644
index 00000000000..909689bcf87
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/FeatureIdAxisItemProvider.java
@@ -0,0 +1,145 @@
+/**
+ * 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.nattable.model.nattable.nattableaxis.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.FeatureIdAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.FeatureIdAxis} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FeatureIdAxisItemProvider
+ extends IdAxisItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FeatureIdAxisItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addLocalLabelConfigurationPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Local Label Configuration feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLocalLabelConfigurationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_FeatureAxis_localLabelConfiguration_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_FeatureAxis_localLabelConfiguration_feature", "_UI_FeatureAxis_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisPackage.Literals.FEATURE_AXIS__LOCAL_LABEL_CONFIGURATION,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns FeatureIdAxis.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/FeatureIdAxis")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((FeatureIdAxis)object).getAlias();
+ return label == null || label.length() == 0 ?
+ getString("_UI_FeatureIdAxis_type") : //$NON-NLS-1$
+ getString("_UI_FeatureIdAxis_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/IdAxisItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/IdAxisItemProvider.java
new file mode 100644
index 00000000000..ebd6d67e83e
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/IdAxisItemProvider.java
@@ -0,0 +1,205 @@
+/**
+ * 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.nattable.model.nattable.nattableaxis.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IdAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisPackage;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IdAxis} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class IdAxisItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IdAxisItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addManagerPropertyDescriptor(object);
+ addAliasPropertyDescriptor(object);
+ addElementPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Manager feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addManagerPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_IAxis_manager_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_IAxis_manager_feature", "_UI_IAxis_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisPackage.Literals.IAXIS__MANAGER,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Alias feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAliasPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_IAxis_alias_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_IAxis_alias_feature", "_UI_IAxis_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisPackage.Literals.IAXIS__ALIAS,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Element feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_IdAxis_element_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_IdAxis_element_feature", "_UI_IdAxis_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisPackage.Literals.ID_AXIS__ELEMENT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((IdAxis)object).getAlias();
+ return label == null || label.length() == 0 ?
+ getString("_UI_IdAxis_type") : //$NON-NLS-1$
+ getString("_UI_IdAxis_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(IdAxis.class)) {
+ case NattableaxisPackage.ID_AXIS__ALIAS:
+ case NattableaxisPackage.ID_AXIS__ELEMENT:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return NattableEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/NattableaxisItemProviderAdapterFactory.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/NattableaxisItemProviderAdapterFactory.java
new file mode 100644
index 00000000000..33d61ec170a
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/NattableaxisItemProviderAdapterFactory.java
@@ -0,0 +1,281 @@
+/**
+ * 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.nattable.model.nattable.nattableaxis.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.util.NattableaxisAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NattableaxisItemProviderAdapterFactory extends NattableaxisAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NattableaxisItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectAxis} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EObjectAxisItemProvider eObjectAxisItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectAxis}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createEObjectAxisAdapter() {
+ if (eObjectAxisItemProvider == null) {
+ eObjectAxisItemProvider = new EObjectAxisItemProvider(this);
+ }
+
+ return eObjectAxisItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.FeatureIdAxis} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FeatureIdAxisItemProvider featureIdAxisItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.FeatureIdAxis}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createFeatureIdAxisAdapter() {
+ if (featureIdAxisItemProvider == null) {
+ featureIdAxisItemProvider = new FeatureIdAxisItemProvider(this);
+ }
+
+ return featureIdAxisItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EStructuralFeatureAxisItemProvider eStructuralFeatureAxisItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createEStructuralFeatureAxisAdapter() {
+ if (eStructuralFeatureAxisItemProvider == null) {
+ eStructuralFeatureAxisItemProvider = new EStructuralFeatureAxisItemProvider(this);
+ }
+
+ return eStructuralFeatureAxisItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ObjectIdAxis} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ObjectIdAxisItemProvider objectIdAxisItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ObjectIdAxis}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createObjectIdAxisAdapter() {
+ if (objectIdAxisItemProvider == null) {
+ objectIdAxisItemProvider = new ObjectIdAxisItemProvider(this);
+ }
+
+ return objectIdAxisItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (eObjectAxisItemProvider != null) eObjectAxisItemProvider.dispose();
+ if (featureIdAxisItemProvider != null) featureIdAxisItemProvider.dispose();
+ if (eStructuralFeatureAxisItemProvider != null) eStructuralFeatureAxisItemProvider.dispose();
+ if (objectIdAxisItemProvider != null) objectIdAxisItemProvider.dispose();
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/ObjectAxisItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/ObjectAxisItemProvider.java
new file mode 100644
index 00000000000..f973a3991d0
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/ObjectAxisItemProvider.java
@@ -0,0 +1,204 @@
+/**
+ * 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.nattable.model.nattable.nattableaxis.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ObjectAxis;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ObjectAxis} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ObjectAxisItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ObjectAxisItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addManagerPropertyDescriptor(object);
+ addAliasPropertyDescriptor(object);
+ addLocalLabelConfigurationPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Manager feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addManagerPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_IAxis_manager_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_IAxis_manager_feature", "_UI_IAxis_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisPackage.Literals.IAXIS__MANAGER,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Alias feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAliasPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_IAxis_alias_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_IAxis_alias_feature", "_UI_IAxis_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisPackage.Literals.IAXIS__ALIAS,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Local Label Configuration feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLocalLabelConfigurationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ObjectAxis_localLabelConfiguration_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_ObjectAxis_localLabelConfiguration_feature", "_UI_ObjectAxis_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisPackage.Literals.OBJECT_AXIS__LOCAL_LABEL_CONFIGURATION,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((ObjectAxis)object).getAlias();
+ return label == null || label.length() == 0 ?
+ getString("_UI_ObjectAxis_type") : //$NON-NLS-1$
+ getString("_UI_ObjectAxis_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ObjectAxis.class)) {
+ case NattableaxisPackage.OBJECT_AXIS__ALIAS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return NattableEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/ObjectIdAxisItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/ObjectIdAxisItemProvider.java
new file mode 100644
index 00000000000..c34ba612abb
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/provider/ObjectIdAxisItemProvider.java
@@ -0,0 +1,145 @@
+/**
+ * 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.nattable.model.nattable.nattableaxis.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ObjectIdAxis;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ObjectIdAxis} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ObjectIdAxisItemProvider
+ extends IdAxisItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ObjectIdAxisItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addLocalLabelConfigurationPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Local Label Configuration feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLocalLabelConfigurationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ObjectAxis_localLabelConfiguration_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_ObjectAxis_localLabelConfiguration_feature", "_UI_ObjectAxis_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisPackage.Literals.OBJECT_AXIS__LOCAL_LABEL_CONFIGURATION,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns ObjectIdAxis.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ObjectIdAxis")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((ObjectIdAxis)object).getAlias();
+ return label == null || label.length() == 0 ?
+ getString("_UI_ObjectIdAxis_type") : //$NON-NLS-1$
+ getString("_UI_ObjectIdAxis_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/AbstractTableConfigurationItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AbstractHeaderAxisConfigurationItemProvider.java
index 4cafe4a37b1..0ee9ed4638e 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/AbstractTableConfigurationItemProvider.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AbstractHeaderAxisConfigurationItemProvider.java
@@ -10,7 +10,7 @@
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
*/
-package org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider;
+package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider;
import java.util.Collection;
@@ -35,20 +35,22 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.AbstractTableConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.NattableconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.NattablelabelproviderFactory;
import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
/**
- * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.AbstractTableConfiguration} object.
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
-public class AbstractTableConfigurationItemProvider
+public class AbstractHeaderAxisConfigurationItemProvider
extends EModelElementItemProvider
implements
IEditingDomainItemProvider,
@@ -62,7 +64,7 @@ public class AbstractTableConfigurationItemProvider
* <!-- end-user-doc -->
* @generated
*/
- public AbstractTableConfigurationItemProvider(AdapterFactory adapterFactory) {
+ public AbstractHeaderAxisConfigurationItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
@@ -77,27 +79,28 @@ public class AbstractTableConfigurationItemProvider
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
- addEditorDeclarationPropertyDescriptor(object);
- addNamePropertyDescriptor(object);
- addDescriptionPropertyDescriptor(object);
+ addIndexStylePropertyDescriptor(object);
+ addDisplayLabelPropertyDescriptor(object);
+ addDisplayFilterPropertyDescriptor(object);
+ addDisplayIndexPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
- * This adds a property descriptor for the Editor Declaration feature.
+ * This adds a property descriptor for the Index Style feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addEditorDeclarationPropertyDescriptor(Object object) {
+ protected void addIndexStylePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_AbstractTableConfiguration_editorDeclaration_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_AbstractTableConfiguration_editorDeclaration_feature", "_UI_AbstractTableConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__EDITOR_DECLARATION,
+ getString("_UI_AbstractHeaderAxisConfiguration_indexStyle_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AbstractHeaderAxisConfiguration_indexStyle_feature", "_UI_AbstractHeaderAxisConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.ABSTRACT_HEADER_AXIS_CONFIGURATION__INDEX_STYLE,
true,
false,
false,
@@ -107,45 +110,67 @@ public class AbstractTableConfigurationItemProvider
}
/**
- * This adds a property descriptor for the Name feature.
+ * This adds a property descriptor for the Display Label feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addNamePropertyDescriptor(Object object) {
+ protected void addDisplayLabelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_AbstractTableConfiguration_name_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_AbstractTableConfiguration_name_feature", "_UI_AbstractTableConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__NAME,
+ getString("_UI_AbstractHeaderAxisConfiguration_displayLabel_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AbstractHeaderAxisConfiguration_displayLabel_feature", "_UI_AbstractHeaderAxisConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL,
true,
false,
false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
/**
- * This adds a property descriptor for the Description feature.
+ * This adds a property descriptor for the Display Filter feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addDescriptionPropertyDescriptor(Object object) {
+ protected void addDisplayFilterPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_AbstractTableConfiguration_description_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_AbstractTableConfiguration_description_feature", "_UI_AbstractTableConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__DESCRIPTION,
+ getString("_UI_AbstractHeaderAxisConfiguration_displayFilter_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AbstractHeaderAxisConfiguration_displayFilter_feature", "_UI_AbstractHeaderAxisConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER,
true,
false,
false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Display Index feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDisplayIndexPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AbstractHeaderAxisConfiguration_displayIndex_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AbstractHeaderAxisConfiguration_displayIndex_feature", "_UI_AbstractHeaderAxisConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
@@ -162,8 +187,8 @@ public class AbstractTableConfigurationItemProvider
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
- childrenFeatures.add(NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__ROW_AXIS_PROVIDER);
- childrenFeatures.add(NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__COLUMN_AXIS_PROVIDER);
+ childrenFeatures.add(NattableaxisconfigurationPackage.Literals.ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATION);
+ childrenFeatures.add(NattableaxisconfigurationPackage.Literals.ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATION);
}
return childrenFeatures;
}
@@ -189,10 +214,11 @@ public class AbstractTableConfigurationItemProvider
*/
@Override
public String getText(Object object) {
- String label = ((AbstractTableConfiguration)object).getName();
+ AxisIndexStyle labelValue = ((AbstractHeaderAxisConfiguration)object).getIndexStyle();
+ String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ?
- getString("_UI_AbstractTableConfiguration_type") : //$NON-NLS-1$
- getString("_UI_AbstractTableConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ getString("_UI_AbstractHeaderAxisConfiguration_type") : //$NON-NLS-1$
+ getString("_UI_AbstractHeaderAxisConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -206,14 +232,15 @@ public class AbstractTableConfigurationItemProvider
public void notifyChanged(Notification notification) {
updateChildren(notification);
- switch (notification.getFeatureID(AbstractTableConfiguration.class)) {
- case NattableconfigurationPackage.ABSTRACT_TABLE_CONFIGURATION__EDITOR_DECLARATION:
- case NattableconfigurationPackage.ABSTRACT_TABLE_CONFIGURATION__NAME:
- case NattableconfigurationPackage.ABSTRACT_TABLE_CONFIGURATION__DESCRIPTION:
+ switch (notification.getFeatureID(AbstractHeaderAxisConfiguration.class)) {
+ case NattableaxisconfigurationPackage.ABSTRACT_HEADER_AXIS_CONFIGURATION__INDEX_STYLE:
+ case NattableaxisconfigurationPackage.ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_LABEL:
+ case NattableaxisconfigurationPackage.ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_FILTER:
+ case NattableaxisconfigurationPackage.ABSTRACT_HEADER_AXIS_CONFIGURATION__DISPLAY_INDEX:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
- case NattableconfigurationPackage.ABSTRACT_TABLE_CONFIGURATION__ROW_AXIS_PROVIDER:
- case NattableconfigurationPackage.ABSTRACT_TABLE_CONFIGURATION__COLUMN_AXIS_PROVIDER:
+ case NattableaxisconfigurationPackage.ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATION:
+ case NattableaxisconfigurationPackage.ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATION:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -233,46 +260,33 @@ public class AbstractTableConfigurationItemProvider
newChildDescriptors.add
(createChildParameter
- (NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__ROW_AXIS_PROVIDER,
- NattableaxisproviderFactory.eINSTANCE.createDefaultAxisProvider()));
+ (NattableaxisconfigurationPackage.Literals.ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATION,
+ NattablelabelproviderFactory.eINSTANCE.createObjectLabelProviderConfiguration()));
newChildDescriptors.add
(createChildParameter
- (NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__ROW_AXIS_PROVIDER,
- NattableaxisproviderFactory.eINSTANCE.createEMFFeatureValueAxisProvider()));
+ (NattableaxisconfigurationPackage.Literals.ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_LABEL_CONFIGURATION,
+ NattablelabelproviderFactory.eINSTANCE.createFeatureLabelProviderConfiguration()));
newChildDescriptors.add
(createChildParameter
- (NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__COLUMN_AXIS_PROVIDER,
- NattableaxisproviderFactory.eINSTANCE.createDefaultAxisProvider()));
+ (NattableaxisconfigurationPackage.Literals.ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATION,
+ NattableaxisconfigurationFactory.eINSTANCE.createFeatureAxisConfiguration()));
newChildDescriptors.add
(createChildParameter
- (NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__COLUMN_AXIS_PROVIDER,
- NattableaxisproviderFactory.eINSTANCE.createEMFFeatureValueAxisProvider()));
- }
+ (NattableaxisconfigurationPackage.Literals.ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATION,
+ NattableaxisconfigurationFactory.eINSTANCE.createEStructuralFeatureValueFillingConfiguration()));
- /**
- * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
- Object childFeature = feature;
- Object childObject = child;
-
- boolean qualify =
- childFeature == NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__ROW_AXIS_PROVIDER ||
- childFeature == NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__COLUMN_AXIS_PROVIDER;
-
- if (qualify) {
- return getString
- ("_UI_CreateChild_text2", //$NON-NLS-1$
- new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
- }
- return super.getCreateChildText(owner, feature, child, selection);
+ newChildDescriptors.add
+ (createChildParameter
+ (NattableaxisconfigurationPackage.Literals.ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATION,
+ NattableaxisconfigurationFactory.eINSTANCE.createIPasteConfiguration()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattableaxisconfigurationPackage.Literals.ABSTRACT_HEADER_AXIS_CONFIGURATION__OWNED_AXIS_CONFIGURATION,
+ NattableaxisconfigurationFactory.eINSTANCE.createPasteEObjectConfiguration()));
}
/**
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AxisManagerConfigurationItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AxisManagerConfigurationItemProvider.java
new file mode 100644
index 00000000000..61ad295fc36
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AxisManagerConfigurationItemProvider.java
@@ -0,0 +1,203 @@
+/**
+ * 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.nattable.model.nattable.nattableaxisconfiguration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AxisManagerConfigurationItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AxisManagerConfigurationItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addLocalHeaderLabelConfigurationPropertyDescriptor(object);
+ addAxisManagerPropertyDescriptor(object);
+ addLocalSpecificConfigurationPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Local Header Label Configuration feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLocalHeaderLabelConfigurationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AxisManagerConfiguration_localHeaderLabelConfiguration_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AxisManagerConfiguration_localHeaderLabelConfiguration_feature", "_UI_AxisManagerConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.AXIS_MANAGER_CONFIGURATION__LOCAL_HEADER_LABEL_CONFIGURATION,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Axis Manager feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAxisManagerPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AxisManagerConfiguration_axisManager_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AxisManagerConfiguration_axisManager_feature", "_UI_AxisManagerConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.AXIS_MANAGER_CONFIGURATION__AXIS_MANAGER,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Local Specific Configuration feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLocalSpecificConfigurationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AxisManagerConfiguration_localSpecificConfiguration_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AxisManagerConfiguration_localSpecificConfiguration_feature", "_UI_AxisManagerConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.AXIS_MANAGER_CONFIGURATION__LOCAL_SPECIFIC_CONFIGURATION,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns AxisManagerConfiguration.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/AxisManagerConfiguration")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_AxisManagerConfiguration_type"); //$NON-NLS-1$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return NattableEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/DefaultAxisConfigurationItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AxisManagerRepresentationItemProvider.java
index ff18d9462ef..4d08735dac3 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/DefaultAxisConfigurationItemProvider.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AxisManagerRepresentationItemProvider.java
@@ -19,6 +19,8 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -27,20 +29,22 @@ import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.DefaultAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
+
/**
- * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.DefaultAxisConfiguration} object.
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
-public class DefaultAxisConfigurationItemProvider
- extends AbstractAxisConfigurationItemProvider
+public class AxisManagerRepresentationItemProvider
+ extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
@@ -53,7 +57,7 @@ public class DefaultAxisConfigurationItemProvider
* <!-- end-user-doc -->
* @generated
*/
- public DefaultAxisConfigurationItemProvider(AdapterFactory adapterFactory) {
+ public AxisManagerRepresentationItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
@@ -68,28 +72,28 @@ public class DefaultAxisConfigurationItemProvider
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
- addIndexStylePropertyDescriptor(object);
- addDisplayLabelPropertyDescriptor(object);
- addDisplayFilterPropertyDescriptor(object);
- addDisplayIndexPropertyDescriptor(object);
+ addAxisManagerIdPropertyDescriptor(object);
+ addLabelProviderContextPropertyDescriptor(object);
+ addHeaderLabelConfigurationPropertyDescriptor(object);
+ addSpecificAxisConfigurationPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
- * This adds a property descriptor for the Index Style feature.
+ * This adds a property descriptor for the Axis Manager Id feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addIndexStylePropertyDescriptor(Object object) {
+ protected void addAxisManagerIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_DefaultAxisConfiguration_indexStyle_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_DefaultAxisConfiguration_indexStyle_feature", "_UI_DefaultAxisConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattableaxisconfigurationPackage.Literals.DEFAULT_AXIS_CONFIGURATION__INDEX_STYLE,
+ getString("_UI_AxisManagerRepresentation_axisManagerId_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AxisManagerRepresentation_axisManagerId_feature", "_UI_AxisManagerRepresentation_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.AXIS_MANAGER_REPRESENTATION__AXIS_MANAGER_ID,
true,
false,
false,
@@ -99,80 +103,80 @@ public class DefaultAxisConfigurationItemProvider
}
/**
- * This adds a property descriptor for the Display Index feature.
+ * This adds a property descriptor for the Label Provider Context feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addDisplayIndexPropertyDescriptor(Object object) {
+ protected void addLabelProviderContextPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_DefaultAxisConfiguration_displayIndex_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_DefaultAxisConfiguration_displayIndex_feature", "_UI_DefaultAxisConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattableaxisconfigurationPackage.Literals.DEFAULT_AXIS_CONFIGURATION__DISPLAY_INDEX,
+ getString("_UI_AxisManagerRepresentation_labelProviderContext_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AxisManagerRepresentation_labelProviderContext_feature", "_UI_AxisManagerRepresentation_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.AXIS_MANAGER_REPRESENTATION__LABEL_PROVIDER_CONTEXT,
true,
false,
false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
- * This adds a property descriptor for the Display Label feature.
+ * This adds a property descriptor for the Header Label Configuration feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addDisplayLabelPropertyDescriptor(Object object) {
+ protected void addHeaderLabelConfigurationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_DefaultAxisConfiguration_displayLabel_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_DefaultAxisConfiguration_displayLabel_feature", "_UI_DefaultAxisConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattableaxisconfigurationPackage.Literals.DEFAULT_AXIS_CONFIGURATION__DISPLAY_LABEL,
+ getString("_UI_AxisManagerRepresentation_headerLabelConfiguration_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AxisManagerRepresentation_headerLabelConfiguration_feature", "_UI_AxisManagerRepresentation_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.AXIS_MANAGER_REPRESENTATION__HEADER_LABEL_CONFIGURATION,
true,
false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ true,
+ null,
null,
null));
}
/**
- * This adds a property descriptor for the Display Filter feature.
+ * This adds a property descriptor for the Specific Axis Configuration feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addDisplayFilterPropertyDescriptor(Object object) {
+ protected void addSpecificAxisConfigurationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_DefaultAxisConfiguration_displayFilter_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_DefaultAxisConfiguration_displayFilter_feature", "_UI_DefaultAxisConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattableaxisconfigurationPackage.Literals.DEFAULT_AXIS_CONFIGURATION__DISPLAY_FILTER,
+ getString("_UI_AxisManagerRepresentation_specificAxisConfiguration_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AxisManagerRepresentation_specificAxisConfiguration_feature", "_UI_AxisManagerRepresentation_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.AXIS_MANAGER_REPRESENTATION__SPECIFIC_AXIS_CONFIGURATION,
true,
false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ true,
+ null,
null,
null));
}
/**
- * This returns DefaultAxisConfiguration.gif.
+ * This returns AxisManagerRepresentation.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/DefaultAxisConfiguration")); //$NON-NLS-1$
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/AxisManagerRepresentation")); //$NON-NLS-1$
}
/**
@@ -183,11 +187,10 @@ public class DefaultAxisConfigurationItemProvider
*/
@Override
public String getText(Object object) {
- AxisIndexStyle labelValue = ((DefaultAxisConfiguration)object).getIndexStyle();
- String label = labelValue == null ? null : labelValue.toString();
+ String label = ((AxisManagerRepresentation)object).getAxisManagerId();
return label == null || label.length() == 0 ?
- getString("_UI_DefaultAxisConfiguration_type") : //$NON-NLS-1$
- getString("_UI_DefaultAxisConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ getString("_UI_AxisManagerRepresentation_type") : //$NON-NLS-1$
+ getString("_UI_AxisManagerRepresentation_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -201,11 +204,9 @@ public class DefaultAxisConfigurationItemProvider
public void notifyChanged(Notification notification) {
updateChildren(notification);
- switch (notification.getFeatureID(DefaultAxisConfiguration.class)) {
- case NattableaxisconfigurationPackage.DEFAULT_AXIS_CONFIGURATION__INDEX_STYLE:
- case NattableaxisconfigurationPackage.DEFAULT_AXIS_CONFIGURATION__DISPLAY_LABEL:
- case NattableaxisconfigurationPackage.DEFAULT_AXIS_CONFIGURATION__DISPLAY_FILTER:
- case NattableaxisconfigurationPackage.DEFAULT_AXIS_CONFIGURATION__DISPLAY_INDEX:
+ switch (notification.getFeatureID(AxisManagerRepresentation.class)) {
+ case NattableaxisconfigurationPackage.AXIS_MANAGER_REPRESENTATION__AXIS_MANAGER_ID:
+ case NattableaxisconfigurationPackage.AXIS_MANAGER_REPRESENTATION__LABEL_PROVIDER_CONTEXT:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
@@ -224,4 +225,15 @@ public class DefaultAxisConfigurationItemProvider
super.collectNewChildDescriptors(newChildDescriptors, object);
}
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return NattableEditPlugin.INSTANCE;
+ }
+
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/IdAxisItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/EStructuralFeatureValueFillingConfigurationItemProvider.java
index c73e0bada03..49fa61cee8d 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/IdAxisItemProvider.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/EStructuralFeatureValueFillingConfigurationItemProvider.java
@@ -10,7 +10,7 @@
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
*/
-package org.eclipse.papyrus.infra.nattable.model.nattable.provider;
+package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider;
import java.util.Collection;
@@ -21,8 +21,6 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.provider.EModelElementItemProvider;
-
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -30,20 +28,20 @@ import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.IdAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
/**
- * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.IdAxis} object.
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.EStructuralFeatureValueFillingConfiguration} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
-public class IdAxisItemProvider
- extends EModelElementItemProvider
+public class EStructuralFeatureValueFillingConfigurationItemProvider
+ extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
@@ -56,7 +54,7 @@ public class IdAxisItemProvider
* <!-- end-user-doc -->
* @generated
*/
- public IdAxisItemProvider(AdapterFactory adapterFactory) {
+ public EStructuralFeatureValueFillingConfigurationItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
@@ -71,42 +69,42 @@ public class IdAxisItemProvider
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
- addElementPropertyDescriptor(object);
+ addListenFeaturePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
- * This adds a property descriptor for the Element feature.
+ * This adds a property descriptor for the Listen Feature feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addElementPropertyDescriptor(Object object) {
+ protected void addListenFeaturePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_IdAxis_element_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_IdAxis_element_feature", "_UI_IdAxis_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattablePackage.Literals.ID_AXIS__ELEMENT,
+ getString("_UI_EStructuralFeatureValueFillingConfiguration_listenFeature_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_EStructuralFeatureValueFillingConfiguration_listenFeature_feature", "_UI_EStructuralFeatureValueFillingConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.ESTRUCTURAL_FEATURE_VALUE_FILLING_CONFIGURATION__LISTEN_FEATURE,
true,
false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ true,
+ null,
null,
null));
}
/**
- * This returns IdAxis.gif.
+ * This returns EStructuralFeatureValueFillingConfiguration.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/IdAxis")); //$NON-NLS-1$
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/EStructuralFeatureValueFillingConfiguration")); //$NON-NLS-1$
}
/**
@@ -117,10 +115,7 @@ public class IdAxisItemProvider
*/
@Override
public String getText(Object object) {
- String label = ((IdAxis)object).getElement();
- return label == null || label.length() == 0 ?
- getString("_UI_IdAxis_type") : //$NON-NLS-1$
- getString("_UI_IdAxis_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return getString("_UI_EStructuralFeatureValueFillingConfiguration_type"); //$NON-NLS-1$
}
/**
@@ -133,12 +128,6 @@ public class IdAxisItemProvider
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
-
- switch (notification.getFeatureID(IdAxis.class)) {
- case NattablePackage.ID_AXIS__ELEMENT:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- }
super.notifyChanged(notification);
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/FeatureAxisConfigurationItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/FeatureAxisConfigurationItemProvider.java
new file mode 100644
index 00000000000..2fea36a6407
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/FeatureAxisConfigurationItemProvider.java
@@ -0,0 +1,167 @@
+/**
+ * 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.nattable.model.nattable.nattableaxisconfiguration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.FeatureAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.FeatureAxisConfiguration} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FeatureAxisConfigurationItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FeatureAxisConfigurationItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addShowOnlyCommonFeaturePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Show Only Common Feature feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addShowOnlyCommonFeaturePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_FeatureAxisConfiguration_showOnlyCommonFeature_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_FeatureAxisConfiguration_showOnlyCommonFeature_feature", "_UI_FeatureAxisConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.FEATURE_AXIS_CONFIGURATION__SHOW_ONLY_COMMON_FEATURE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns FeatureAxisConfiguration.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/FeatureAxisConfiguration")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ FeatureAxisConfiguration featureAxisConfiguration = (FeatureAxisConfiguration)object;
+ return getString("_UI_FeatureAxisConfiguration_type") + " " + featureAxisConfiguration.isShowOnlyCommonFeature(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(FeatureAxisConfiguration.class)) {
+ case NattableaxisconfigurationPackage.FEATURE_AXIS_CONFIGURATION__SHOW_ONLY_COMMON_FEATURE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return NattableEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/IPasteConfigurationItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/IPasteConfigurationItemProvider.java
new file mode 100644
index 00000000000..ac4d28ffa03
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/IPasteConfigurationItemProvider.java
@@ -0,0 +1,131 @@
+/**
+ * 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.nattable.model.nattable.nattableaxisconfiguration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class IPasteConfigurationItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IPasteConfigurationItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns IPasteConfiguration.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/IPasteConfiguration")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_IPasteConfiguration_type"); //$NON-NLS-1$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return NattableEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AbstractAxisConfigurationItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/LocalTableHeaderAxisConfigurationItemProvider.java
index f12aeb4a46b..ef36920dd73 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/AbstractAxisConfigurationItemProvider.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/LocalTableHeaderAxisConfigurationItemProvider.java
@@ -19,12 +19,8 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.provider.EModelElementItemProvider;
-
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
@@ -33,21 +29,19 @@ import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.LocalTableHeaderAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationFactory;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.NattablelabelproviderFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
-
/**
- * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractAxisConfiguration} object.
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.LocalTableHeaderAxisConfiguration} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
-public class AbstractAxisConfigurationItemProvider
- extends EModelElementItemProvider
+public class LocalTableHeaderAxisConfigurationItemProvider
+ extends AbstractHeaderAxisConfigurationItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
@@ -60,7 +54,7 @@ public class AbstractAxisConfigurationItemProvider
* <!-- end-user-doc -->
* @generated
*/
- public AbstractAxisConfigurationItemProvider(AdapterFactory adapterFactory) {
+ public LocalTableHeaderAxisConfigurationItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
@@ -91,7 +85,7 @@ public class AbstractAxisConfigurationItemProvider
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
- childrenFeatures.add(NattableaxisconfigurationPackage.Literals.ABSTRACT_AXIS_CONFIGURATION__LABEL_CONFIGURATION);
+ childrenFeatures.add(NattableaxisconfigurationPackage.Literals.LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGER_CONFIGURATIONS);
}
return childrenFeatures;
}
@@ -110,14 +104,14 @@ public class AbstractAxisConfigurationItemProvider
}
/**
- * This returns AbstractAxisConfiguration.gif.
+ * This returns LocalTableHeaderAxisConfiguration.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/AbstractAxisConfiguration")); //$NON-NLS-1$
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/LocalTableHeaderAxisConfiguration")); //$NON-NLS-1$
}
/**
@@ -128,7 +122,11 @@ public class AbstractAxisConfigurationItemProvider
*/
@Override
public String getText(Object object) {
- return getString("_UI_AbstractAxisConfiguration_type"); //$NON-NLS-1$
+ AxisIndexStyle labelValue = ((LocalTableHeaderAxisConfiguration)object).getIndexStyle();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ?
+ getString("_UI_LocalTableHeaderAxisConfiguration_type") : //$NON-NLS-1$
+ getString("_UI_LocalTableHeaderAxisConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -142,8 +140,8 @@ public class AbstractAxisConfigurationItemProvider
public void notifyChanged(Notification notification) {
updateChildren(notification);
- switch (notification.getFeatureID(AbstractAxisConfiguration.class)) {
- case NattableaxisconfigurationPackage.ABSTRACT_AXIS_CONFIGURATION__LABEL_CONFIGURATION:
+ switch (notification.getFeatureID(LocalTableHeaderAxisConfiguration.class)) {
+ case NattableaxisconfigurationPackage.LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGER_CONFIGURATIONS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -163,24 +161,8 @@ public class AbstractAxisConfigurationItemProvider
newChildDescriptors.add
(createChildParameter
- (NattableaxisconfigurationPackage.Literals.ABSTRACT_AXIS_CONFIGURATION__LABEL_CONFIGURATION,
- NattablelabelproviderFactory.eINSTANCE.createObjectLabelProviderConfiguration()));
-
- newChildDescriptors.add
- (createChildParameter
- (NattableaxisconfigurationPackage.Literals.ABSTRACT_AXIS_CONFIGURATION__LABEL_CONFIGURATION,
- NattablelabelproviderFactory.eINSTANCE.createFeatureLabelProviderConfiguration()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return NattableEditPlugin.INSTANCE;
+ (NattableaxisconfigurationPackage.Literals.LOCAL_TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGER_CONFIGURATIONS,
+ NattableaxisconfigurationFactory.eINSTANCE.createAxisManagerConfiguration()));
}
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/NattableaxisconfigurationItemProviderAdapterFactory.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/NattableaxisconfigurationItemProviderAdapterFactory.java
index a64e14b0e1c..bc8f16ca72b 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/NattableaxisconfigurationItemProviderAdapterFactory.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/NattableaxisconfigurationItemProviderAdapterFactory.java
@@ -82,49 +82,187 @@ public class NattableaxisconfigurationItemProviderAdapterFactory extends Nattabl
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractAxisConfiguration} instances.
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected AbstractAxisConfigurationItemProvider abstractAxisConfigurationItemProvider;
+ protected AxisManagerRepresentationItemProvider axisManagerRepresentationItemProvider;
/**
- * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractAxisConfiguration}.
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
- public Adapter createAbstractAxisConfigurationAdapter() {
- if (abstractAxisConfigurationItemProvider == null) {
- abstractAxisConfigurationItemProvider = new AbstractAxisConfigurationItemProvider(this);
+ public Adapter createAxisManagerRepresentationAdapter() {
+ if (axisManagerRepresentationItemProvider == null) {
+ axisManagerRepresentationItemProvider = new AxisManagerRepresentationItemProvider(this);
}
- return abstractAxisConfigurationItemProvider;
+ return axisManagerRepresentationItemProvider;
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.DefaultAxisConfiguration} instances.
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected DefaultAxisConfigurationItemProvider defaultAxisConfigurationItemProvider;
+ protected AxisManagerConfigurationItemProvider axisManagerConfigurationItemProvider;
/**
- * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.DefaultAxisConfiguration}.
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerConfiguration}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
- public Adapter createDefaultAxisConfigurationAdapter() {
- if (defaultAxisConfigurationItemProvider == null) {
- defaultAxisConfigurationItemProvider = new DefaultAxisConfigurationItemProvider(this);
+ public Adapter createAxisManagerConfigurationAdapter() {
+ if (axisManagerConfigurationItemProvider == null) {
+ axisManagerConfigurationItemProvider = new AxisManagerConfigurationItemProvider(this);
}
- return defaultAxisConfigurationItemProvider;
+ return axisManagerConfigurationItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TableHeaderAxisConfiguration} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TableHeaderAxisConfigurationItemProvider tableHeaderAxisConfigurationItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TableHeaderAxisConfiguration}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTableHeaderAxisConfigurationAdapter() {
+ if (tableHeaderAxisConfigurationItemProvider == null) {
+ tableHeaderAxisConfigurationItemProvider = new TableHeaderAxisConfigurationItemProvider(this);
+ }
+
+ return tableHeaderAxisConfigurationItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.LocalTableHeaderAxisConfiguration} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected LocalTableHeaderAxisConfigurationItemProvider localTableHeaderAxisConfigurationItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.LocalTableHeaderAxisConfiguration}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createLocalTableHeaderAxisConfigurationAdapter() {
+ if (localTableHeaderAxisConfigurationItemProvider == null) {
+ localTableHeaderAxisConfigurationItemProvider = new LocalTableHeaderAxisConfigurationItemProvider(this);
+ }
+
+ return localTableHeaderAxisConfigurationItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.FeatureAxisConfiguration} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FeatureAxisConfigurationItemProvider featureAxisConfigurationItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.FeatureAxisConfiguration}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createFeatureAxisConfigurationAdapter() {
+ if (featureAxisConfigurationItemProvider == null) {
+ featureAxisConfigurationItemProvider = new FeatureAxisConfigurationItemProvider(this);
+ }
+
+ return featureAxisConfigurationItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.EStructuralFeatureValueFillingConfiguration} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EStructuralFeatureValueFillingConfigurationItemProvider eStructuralFeatureValueFillingConfigurationItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.EStructuralFeatureValueFillingConfiguration}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createEStructuralFeatureValueFillingConfigurationAdapter() {
+ if (eStructuralFeatureValueFillingConfigurationItemProvider == null) {
+ eStructuralFeatureValueFillingConfigurationItemProvider = new EStructuralFeatureValueFillingConfigurationItemProvider(this);
+ }
+
+ return eStructuralFeatureValueFillingConfigurationItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IPasteConfigurationItemProvider iPasteConfigurationItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createIPasteConfigurationAdapter() {
+ if (iPasteConfigurationItemProvider == null) {
+ iPasteConfigurationItemProvider = new IPasteConfigurationItemProvider(this);
+ }
+
+ return iPasteConfigurationItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PasteEObjectConfigurationItemProvider pasteEObjectConfigurationItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPasteEObjectConfigurationAdapter() {
+ if (pasteEObjectConfigurationItemProvider == null) {
+ pasteEObjectConfigurationItemProvider = new PasteEObjectConfigurationItemProvider(this);
+ }
+
+ return pasteEObjectConfigurationItemProvider;
}
/**
@@ -226,8 +364,14 @@ public class NattableaxisconfigurationItemProviderAdapterFactory extends Nattabl
* @generated
*/
public void dispose() {
- if (abstractAxisConfigurationItemProvider != null) abstractAxisConfigurationItemProvider.dispose();
- if (defaultAxisConfigurationItemProvider != null) defaultAxisConfigurationItemProvider.dispose();
+ if (axisManagerRepresentationItemProvider != null) axisManagerRepresentationItemProvider.dispose();
+ if (axisManagerConfigurationItemProvider != null) axisManagerConfigurationItemProvider.dispose();
+ if (tableHeaderAxisConfigurationItemProvider != null) tableHeaderAxisConfigurationItemProvider.dispose();
+ if (localTableHeaderAxisConfigurationItemProvider != null) localTableHeaderAxisConfigurationItemProvider.dispose();
+ if (featureAxisConfigurationItemProvider != null) featureAxisConfigurationItemProvider.dispose();
+ if (eStructuralFeatureValueFillingConfigurationItemProvider != null) eStructuralFeatureValueFillingConfigurationItemProvider.dispose();
+ if (iPasteConfigurationItemProvider != null) iPasteConfigurationItemProvider.dispose();
+ if (pasteEObjectConfigurationItemProvider != null) pasteEObjectConfigurationItemProvider.dispose();
}
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/PasteEObjectConfigurationItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/PasteEObjectConfigurationItemProvider.java
new file mode 100644
index 00000000000..8441226ecc5
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/PasteEObjectConfigurationItemProvider.java
@@ -0,0 +1,176 @@
+/**
+ * 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.nattable.model.nattable.nattableaxisconfiguration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PasteEObjectConfigurationItemProvider
+ extends IPasteConfigurationItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PasteEObjectConfigurationItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addPastedElementIdPropertyDescriptor(object);
+ addPasteElementContainementFeaturePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Pasted Element Id feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPastedElementIdPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PasteEObjectConfiguration_pastedElementId_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PasteEObjectConfiguration_pastedElementId_feature", "_UI_PasteEObjectConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Paste Element Containement Feature feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPasteElementContainementFeaturePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PasteEObjectConfiguration_pasteElementContainementFeature_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PasteEObjectConfiguration_pasteElementContainementFeature_feature", "_UI_PasteEObjectConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisconfigurationPackage.Literals.PASTE_EOBJECT_CONFIGURATION__PASTE_ELEMENT_CONTAINEMENT_FEATURE,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns PasteEObjectConfiguration.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PasteEObjectConfiguration")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((PasteEObjectConfiguration)object).getPastedElementId();
+ return label == null || label.length() == 0 ?
+ getString("_UI_PasteEObjectConfiguration_type") : //$NON-NLS-1$
+ getString("_UI_PasteEObjectConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(PasteEObjectConfiguration.class)) {
+ case NattableaxisconfigurationPackage.PASTE_EOBJECT_CONFIGURATION__PASTED_ELEMENT_ID:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/TableHeaderAxisConfigurationItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/TableHeaderAxisConfigurationItemProvider.java
new file mode 100644
index 00000000000..c967c348e43
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/provider/TableHeaderAxisConfigurationItemProvider.java
@@ -0,0 +1,168 @@
+/**
+ * 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.nattable.model.nattable.nattableaxisconfiguration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TableHeaderAxisConfiguration;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TableHeaderAxisConfiguration} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TableHeaderAxisConfigurationItemProvider
+ extends AbstractHeaderAxisConfigurationItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TableHeaderAxisConfigurationItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(NattableaxisconfigurationPackage.Literals.TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGERS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns TableHeaderAxisConfiguration.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TableHeaderAxisConfiguration")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ AxisIndexStyle labelValue = ((TableHeaderAxisConfiguration)object).getIndexStyle();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ?
+ getString("_UI_TableHeaderAxisConfiguration_type") : //$NON-NLS-1$
+ getString("_UI_TableHeaderAxisConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TableHeaderAxisConfiguration.class)) {
+ case NattableaxisconfigurationPackage.TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGERS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattableaxisconfigurationPackage.Literals.TABLE_HEADER_AXIS_CONFIGURATION__AXIS_MANAGERS,
+ NattableaxisconfigurationFactory.eINSTANCE.createAxisManagerRepresentation()));
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/AbstractAxisProviderItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/AbstractAxisProviderItemProvider.java
index 9eb9b407dac..f8f5068885f 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/AbstractAxisProviderItemProvider.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/AbstractAxisProviderItemProvider.java
@@ -21,8 +21,6 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
import org.eclipse.emf.ecore.provider.EModelElementItemProvider;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
@@ -35,11 +33,11 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationFactory;
-
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.AbstractAxisProvider;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.NattableconfigurationPackage;
+
import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
/**
@@ -77,27 +75,26 @@ public class AbstractAxisProviderItemProvider
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
- addJavaAxisManagerIdsPropertyDescriptor(object);
- addPastedElementTypeIdPropertyDescriptor(object);
- addPastedElementContainmentFeaturePropertyDescriptor(object);
+ addDescriptionPropertyDescriptor(object);
+ addNamePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
- * This adds a property descriptor for the Java Axis Manager Ids feature.
+ * This adds a property descriptor for the Description feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addJavaAxisManagerIdsPropertyDescriptor(Object object) {
+ protected void addDescriptionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_AbstractAxisProvider_javaAxisManagerIds_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_AbstractAxisProvider_javaAxisManagerIds_feature", "_UI_AbstractAxisProvider_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattableaxisproviderPackage.Literals.ABSTRACT_AXIS_PROVIDER__JAVA_AXIS_MANAGER_IDS,
+ getString("_UI_TableNamedElement_description_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TableNamedElement_description_feature", "_UI_TableNamedElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableconfigurationPackage.Literals.TABLE_NAMED_ELEMENT__DESCRIPTION,
true,
false,
false,
@@ -107,19 +104,19 @@ public class AbstractAxisProviderItemProvider
}
/**
- * This adds a property descriptor for the Pasted Element Type Id feature.
+ * This adds a property descriptor for the Name feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addPastedElementTypeIdPropertyDescriptor(Object object) {
+ protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_AbstractAxisProvider_pastedElementTypeId_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_AbstractAxisProvider_pastedElementTypeId_feature", "_UI_AbstractAxisProvider_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattableaxisproviderPackage.Literals.ABSTRACT_AXIS_PROVIDER__PASTED_ELEMENT_TYPE_ID,
+ getString("_UI_TableNamedElement_name_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TableNamedElement_name_feature", "_UI_TableNamedElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableconfigurationPackage.Literals.TABLE_NAMED_ELEMENT__NAME,
true,
false,
false,
@@ -129,58 +126,6 @@ public class AbstractAxisProviderItemProvider
}
/**
- * This adds a property descriptor for the Pasted Element Containment Feature feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addPastedElementContainmentFeaturePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_AbstractAxisProvider_pastedElementContainmentFeature_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_AbstractAxisProvider_pastedElementContainmentFeature_feature", "_UI_AbstractAxisProvider_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattableaxisproviderPackage.Literals.ABSTRACT_AXIS_PROVIDER__PASTED_ELEMENT_CONTAINMENT_FEATURE,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(NattableaxisproviderPackage.Literals.ABSTRACT_AXIS_PROVIDER__AXIS_CONFIGURATION);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -188,7 +133,7 @@ public class AbstractAxisProviderItemProvider
*/
@Override
public String getText(Object object) {
- String label = ((AbstractAxisProvider)object).getPastedElementTypeId();
+ String label = ((AbstractAxisProvider)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_AbstractAxisProvider_type") : //$NON-NLS-1$
getString("_UI_AbstractAxisProvider_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
@@ -206,13 +151,10 @@ public class AbstractAxisProviderItemProvider
updateChildren(notification);
switch (notification.getFeatureID(AbstractAxisProvider.class)) {
- case NattableaxisproviderPackage.ABSTRACT_AXIS_PROVIDER__JAVA_AXIS_MANAGER_IDS:
- case NattableaxisproviderPackage.ABSTRACT_AXIS_PROVIDER__PASTED_ELEMENT_TYPE_ID:
+ case NattableaxisproviderPackage.ABSTRACT_AXIS_PROVIDER__DESCRIPTION:
+ case NattableaxisproviderPackage.ABSTRACT_AXIS_PROVIDER__NAME:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
- case NattableaxisproviderPackage.ABSTRACT_AXIS_PROVIDER__AXIS_CONFIGURATION:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
}
super.notifyChanged(notification);
}
@@ -227,16 +169,6 @@ public class AbstractAxisProviderItemProvider
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add
- (createChildParameter
- (NattableaxisproviderPackage.Literals.ABSTRACT_AXIS_PROVIDER__AXIS_CONFIGURATION,
- NattableaxisconfigurationFactory.eINSTANCE.createAbstractAxisConfiguration()));
-
- newChildDescriptors.add
- (createChildParameter
- (NattableaxisproviderPackage.Literals.ABSTRACT_AXIS_PROVIDER__AXIS_CONFIGURATION,
- NattableaxisconfigurationFactory.eINSTANCE.createDefaultAxisConfiguration()));
}
/**
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/DefaultAxisProviderItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/AxisProviderItemProvider.java
index 54ba048d6b3..e801a378a43 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/DefaultAxisProviderItemProvider.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/AxisProviderItemProvider.java
@@ -29,18 +29,18 @@ import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.eclipse.papyrus.infra.nattable.model.nattable.NattableFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisFactory;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.DefaultAxisProvider;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.AxisProvider;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderPackage;
/**
- * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.DefaultAxisProvider} object.
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.AxisProvider} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
-public class DefaultAxisProviderItemProvider
+public class AxisProviderItemProvider
extends AbstractAxisProviderItemProvider
implements
IEditingDomainItemProvider,
@@ -54,7 +54,7 @@ public class DefaultAxisProviderItemProvider
* <!-- end-user-doc -->
* @generated
*/
- public DefaultAxisProviderItemProvider(AdapterFactory adapterFactory) {
+ public AxisProviderItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
@@ -85,7 +85,7 @@ public class DefaultAxisProviderItemProvider
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
- childrenFeatures.add(NattableaxisproviderPackage.Literals.DEFAULT_AXIS_PROVIDER__AXIS);
+ childrenFeatures.add(NattableaxisproviderPackage.Literals.AXIS_PROVIDER__AXIS);
}
return childrenFeatures;
}
@@ -104,17 +104,6 @@ public class DefaultAxisProviderItemProvider
}
/**
- * This returns DefaultAxisProvider.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/DefaultAxisProvider")); //$NON-NLS-1$
- }
-
- /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -122,10 +111,10 @@ public class DefaultAxisProviderItemProvider
*/
@Override
public String getText(Object object) {
- String label = ((DefaultAxisProvider)object).getPastedElementTypeId();
+ String label = ((AxisProvider)object).getName();
return label == null || label.length() == 0 ?
- getString("_UI_DefaultAxisProvider_type") : //$NON-NLS-1$
- getString("_UI_DefaultAxisProvider_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ getString("_UI_AxisProvider_type") : //$NON-NLS-1$
+ getString("_UI_AxisProvider_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -139,8 +128,8 @@ public class DefaultAxisProviderItemProvider
public void notifyChanged(Notification notification) {
updateChildren(notification);
- switch (notification.getFeatureID(DefaultAxisProvider.class)) {
- case NattableaxisproviderPackage.DEFAULT_AXIS_PROVIDER__AXIS:
+ switch (notification.getFeatureID(AxisProvider.class)) {
+ case NattableaxisproviderPackage.AXIS_PROVIDER__AXIS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -160,13 +149,23 @@ public class DefaultAxisProviderItemProvider
newChildDescriptors.add
(createChildParameter
- (NattableaxisproviderPackage.Literals.DEFAULT_AXIS_PROVIDER__AXIS,
- NattableFactory.eINSTANCE.createIdAxis()));
+ (NattableaxisproviderPackage.Literals.AXIS_PROVIDER__AXIS,
+ NattableaxisFactory.eINSTANCE.createEObjectAxis()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattableaxisproviderPackage.Literals.AXIS_PROVIDER__AXIS,
+ NattableaxisFactory.eINSTANCE.createFeatureIdAxis()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattableaxisproviderPackage.Literals.AXIS_PROVIDER__AXIS,
+ NattableaxisFactory.eINSTANCE.createEStructuralFeatureAxis()));
newChildDescriptors.add
(createChildParameter
- (NattableaxisproviderPackage.Literals.DEFAULT_AXIS_PROVIDER__AXIS,
- NattableFactory.eINSTANCE.createEObjectAxis()));
+ (NattableaxisproviderPackage.Literals.AXIS_PROVIDER__AXIS,
+ NattableaxisFactory.eINSTANCE.createObjectIdAxis()));
}
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/MasterObjectAxisProviderItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/MasterObjectAxisProviderItemProvider.java
new file mode 100644
index 00000000000..a8eeb5a2c5b
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/MasterObjectAxisProviderItemProvider.java
@@ -0,0 +1,153 @@
+/**
+ * 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.nattable.model.nattable.nattableaxisprovider.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.MasterObjectAxisProvider;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.MasterObjectAxisProvider} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MasterObjectAxisProviderItemProvider
+ extends AxisProviderItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MasterObjectAxisProviderItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDisconnectSlavePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Disconnect Slave feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDisconnectSlavePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_IMasterAxisProvider_disconnectSlave_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_IMasterAxisProvider_disconnectSlave_feature", "_UI_IMasterAxisProvider_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableaxisproviderPackage.Literals.IMASTER_AXIS_PROVIDER__DISCONNECT_SLAVE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns MasterObjectAxisProvider.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/MasterObjectAxisProvider")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((MasterObjectAxisProvider)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_MasterObjectAxisProvider_type") : //$NON-NLS-1$
+ getString("_UI_MasterObjectAxisProvider_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(MasterObjectAxisProvider.class)) {
+ case NattableaxisproviderPackage.MASTER_OBJECT_AXIS_PROVIDER__DISCONNECT_SLAVE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/NattableaxisproviderItemProviderAdapterFactory.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/NattableaxisproviderItemProviderAdapterFactory.java
index ae59c80cd7e..9b521ba9b7d 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/NattableaxisproviderItemProviderAdapterFactory.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/NattableaxisproviderItemProviderAdapterFactory.java
@@ -82,49 +82,49 @@ public class NattableaxisproviderItemProviderAdapterFactory extends Nattableaxis
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.DefaultAxisProvider} instances.
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.SlaveObjectAxisProvider} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected DefaultAxisProviderItemProvider defaultAxisProviderItemProvider;
+ protected SlaveObjectAxisProviderItemProvider slaveObjectAxisProviderItemProvider;
/**
- * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.DefaultAxisProvider}.
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.SlaveObjectAxisProvider}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
- public Adapter createDefaultAxisProviderAdapter() {
- if (defaultAxisProviderItemProvider == null) {
- defaultAxisProviderItemProvider = new DefaultAxisProviderItemProvider(this);
+ public Adapter createSlaveObjectAxisProviderAdapter() {
+ if (slaveObjectAxisProviderItemProvider == null) {
+ slaveObjectAxisProviderItemProvider = new SlaveObjectAxisProviderItemProvider(this);
}
- return defaultAxisProviderItemProvider;
+ return slaveObjectAxisProviderItemProvider;
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.EMFFeatureValueAxisProvider} instances.
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.MasterObjectAxisProvider} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected EMFFeatureValueAxisProviderItemProvider emfFeatureValueAxisProviderItemProvider;
+ protected MasterObjectAxisProviderItemProvider masterObjectAxisProviderItemProvider;
/**
- * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.EMFFeatureValueAxisProvider}.
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.MasterObjectAxisProvider}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
- public Adapter createEMFFeatureValueAxisProviderAdapter() {
- if (emfFeatureValueAxisProviderItemProvider == null) {
- emfFeatureValueAxisProviderItemProvider = new EMFFeatureValueAxisProviderItemProvider(this);
+ public Adapter createMasterObjectAxisProviderAdapter() {
+ if (masterObjectAxisProviderItemProvider == null) {
+ masterObjectAxisProviderItemProvider = new MasterObjectAxisProviderItemProvider(this);
}
- return emfFeatureValueAxisProviderItemProvider;
+ return masterObjectAxisProviderItemProvider;
}
/**
@@ -226,8 +226,8 @@ public class NattableaxisproviderItemProviderAdapterFactory extends Nattableaxis
* @generated
*/
public void dispose() {
- if (defaultAxisProviderItemProvider != null) defaultAxisProviderItemProvider.dispose();
- if (emfFeatureValueAxisProviderItemProvider != null) emfFeatureValueAxisProviderItemProvider.dispose();
+ if (slaveObjectAxisProviderItemProvider != null) slaveObjectAxisProviderItemProvider.dispose();
+ if (masterObjectAxisProviderItemProvider != null) masterObjectAxisProviderItemProvider.dispose();
}
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/SlaveObjectAxisProviderItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/SlaveObjectAxisProviderItemProvider.java
new file mode 100644
index 00000000000..ff62af3845b
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/provider/SlaveObjectAxisProviderItemProvider.java
@@ -0,0 +1,120 @@
+/**
+ * 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.nattable.model.nattable.nattableaxisprovider.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.SlaveObjectAxisProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.SlaveObjectAxisProvider} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SlaveObjectAxisProviderItemProvider
+ extends AxisProviderItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SlaveObjectAxisProviderItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns SlaveObjectAxisProvider.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/SlaveObjectAxisProvider")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((SlaveObjectAxisProvider)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_SlaveObjectAxisProvider_type") : //$NON-NLS-1$
+ getString("_UI_SlaveObjectAxisProvider_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/TableConfigurationItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/TableConfigurationItemProvider.java
index dd724c8b120..6e855d54f1d 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/TableConfigurationItemProvider.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/TableConfigurationItemProvider.java
@@ -15,9 +15,12 @@ package org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.
import java.util.Collection;
import java.util.List;
+
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.ecore.EStructuralFeature;
+
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -27,8 +30,14 @@ import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationFactory;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderFactory;
+
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.NattableconfigurationPackage;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.TableConfiguration;
+
import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.NattabletesterFactory;
/**
@@ -38,7 +47,7 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.Nattable
* @generated
*/
public class TableConfigurationItemProvider
- extends AbstractTableConfigurationItemProvider
+ extends TableNamedElementItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
@@ -68,6 +77,9 @@ public class TableConfigurationItemProvider
addTypePropertyDescriptor(object);
addIconPathPropertyDescriptor(object);
+ addCellEditorDeclarationPropertyDescriptor(object);
+ addDefaultRowAxisProviderPropertyDescriptor(object);
+ addDefaultColumnAxisProviderPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -117,6 +129,72 @@ public class TableConfigurationItemProvider
}
/**
+ * This adds a property descriptor for the Cell Editor Declaration feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCellEditorDeclarationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_TableConfiguration_cellEditorDeclaration_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TableConfiguration_cellEditorDeclaration_feature", "_UI_TableConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__CELL_EDITOR_DECLARATION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Default Row Axis Provider feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDefaultRowAxisProviderPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_TableConfiguration_defaultRowAxisProvider_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TableConfiguration_defaultRowAxisProvider_feature", "_UI_TableConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__DEFAULT_ROW_AXIS_PROVIDER,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Default Column Axis Provider feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDefaultColumnAxisProviderPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_TableConfiguration_defaultColumnAxisProvider_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TableConfiguration_defaultColumnAxisProvider_feature", "_UI_TableConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__DEFAULT_COLUMN_AXIS_PROVIDER,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
@@ -129,6 +207,10 @@ public class TableConfigurationItemProvider
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__CREATION_TESTER);
+ childrenFeatures.add(NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__ROW_HEADER_AXIS_CONFIGURATION);
+ childrenFeatures.add(NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__COLUMN_HEADER_AXIS_CONFIGURATION);
+ childrenFeatures.add(NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__COLUMN_AXIS_PROVIDERS);
+ childrenFeatures.add(NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__ROW_AXIS_PROVIDERS);
}
return childrenFeatures;
}
@@ -185,9 +267,14 @@ public class TableConfigurationItemProvider
switch (notification.getFeatureID(TableConfiguration.class)) {
case NattableconfigurationPackage.TABLE_CONFIGURATION__TYPE:
case NattableconfigurationPackage.TABLE_CONFIGURATION__ICON_PATH:
+ case NattableconfigurationPackage.TABLE_CONFIGURATION__CELL_EDITOR_DECLARATION:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case NattableconfigurationPackage.TABLE_CONFIGURATION__CREATION_TESTER:
+ case NattableconfigurationPackage.TABLE_CONFIGURATION__ROW_HEADER_AXIS_CONFIGURATION:
+ case NattableconfigurationPackage.TABLE_CONFIGURATION__COLUMN_HEADER_AXIS_CONFIGURATION:
+ case NattableconfigurationPackage.TABLE_CONFIGURATION__COLUMN_AXIS_PROVIDERS:
+ case NattableconfigurationPackage.TABLE_CONFIGURATION__ROW_AXIS_PROVIDERS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -209,6 +296,36 @@ public class TableConfigurationItemProvider
(createChildParameter
(NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__CREATION_TESTER,
NattabletesterFactory.eINSTANCE.createJavaTableTester()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__ROW_HEADER_AXIS_CONFIGURATION,
+ NattableaxisconfigurationFactory.eINSTANCE.createTableHeaderAxisConfiguration()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__COLUMN_HEADER_AXIS_CONFIGURATION,
+ NattableaxisconfigurationFactory.eINSTANCE.createTableHeaderAxisConfiguration()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__COLUMN_AXIS_PROVIDERS,
+ NattableaxisproviderFactory.eINSTANCE.createSlaveObjectAxisProvider()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__COLUMN_AXIS_PROVIDERS,
+ NattableaxisproviderFactory.eINSTANCE.createMasterObjectAxisProvider()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__ROW_AXIS_PROVIDERS,
+ NattableaxisproviderFactory.eINSTANCE.createSlaveObjectAxisProvider()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__ROW_AXIS_PROVIDERS,
+ NattableaxisproviderFactory.eINSTANCE.createMasterObjectAxisProvider()));
}
/**
@@ -223,8 +340,10 @@ public class TableConfigurationItemProvider
Object childObject = child;
boolean qualify =
- childFeature == NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__ROW_AXIS_PROVIDER ||
- childFeature == NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__COLUMN_AXIS_PROVIDER;
+ childFeature == NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__ROW_HEADER_AXIS_CONFIGURATION ||
+ childFeature == NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__COLUMN_HEADER_AXIS_CONFIGURATION ||
+ childFeature == NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__COLUMN_AXIS_PROVIDERS ||
+ childFeature == NattableconfigurationPackage.Literals.TABLE_CONFIGURATION__ROW_AXIS_PROVIDERS;
if (qualify) {
return getString
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/TableNamedElementItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/TableNamedElementItemProvider.java
new file mode 100644
index 00000000000..e7fe33b2de4
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/TableNamedElementItemProvider.java
@@ -0,0 +1,183 @@
+/**
+ * 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.nattable.model.nattable.nattableconfiguration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.provider.EModelElementItemProvider;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.NattableconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.TableNamedElement;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.TableNamedElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TableNamedElementItemProvider
+ extends EModelElementItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TableNamedElementItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDescriptionPropertyDescriptor(object);
+ addNamePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Description feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDescriptionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_TableNamedElement_description_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TableNamedElement_description_feature", "_UI_TableNamedElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableconfigurationPackage.Literals.TABLE_NAMED_ELEMENT__DESCRIPTION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_TableNamedElement_name_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TableNamedElement_name_feature", "_UI_TableNamedElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattableconfigurationPackage.Literals.TABLE_NAMED_ELEMENT__NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((TableNamedElement)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_TableNamedElement_type") : //$NON-NLS-1$
+ getString("_UI_TableNamedElement_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TableNamedElement.class)) {
+ case NattableconfigurationPackage.TABLE_NAMED_ELEMENT__DESCRIPTION:
+ case NattableconfigurationPackage.TABLE_NAMED_ELEMENT__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return NattableEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/FeatureLabelProviderConfigurationItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/FeatureLabelProviderConfigurationItemProvider.java
index 30d9a68147a..3b8164089fa 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/FeatureLabelProviderConfigurationItemProvider.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/FeatureLabelProviderConfigurationItemProvider.java
@@ -39,8 +39,7 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.N
* @generated
*/
public class FeatureLabelProviderConfigurationItemProvider
- extends
-ObjectLabelProviderConfigurationItemProvider
+ extends ObjectLabelProviderConfigurationItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/AbstractTableCreationTesterItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/ILabelProviderConfigurationItemProvider.java
index f1133f1d0d0..3f51d8b1fa3 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/provider/AbstractTableCreationTesterItemProvider.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/ILabelProviderConfigurationItemProvider.java
@@ -10,7 +10,7 @@
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
*/
-package org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider;
+package org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider;
import java.util.Collection;
@@ -21,24 +21,25 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.provider.EModelElementItemProvider;
+
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
/**
- * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.AbstractTableCreationTester} object.
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
-public class AbstractTableCreationTesterItemProvider
- extends ItemProviderAdapter
+public class ILabelProviderConfigurationItemProvider
+ extends EModelElementItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
@@ -51,7 +52,7 @@ public class AbstractTableCreationTesterItemProvider
* <!-- end-user-doc -->
* @generated
*/
- public AbstractTableCreationTesterItemProvider(AdapterFactory adapterFactory) {
+ public ILabelProviderConfigurationItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
@@ -78,7 +79,7 @@ public class AbstractTableCreationTesterItemProvider
*/
@Override
public String getText(Object object) {
- return getString("_UI_AbstractTableCreationTester_type"); //$NON-NLS-1$
+ return getString("_UI_ILabelProviderConfiguration_type"); //$NON-NLS-1$
}
/**
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/ObjectLabelProviderConfigurationItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/ObjectLabelProviderConfigurationItemProvider.java
index 313bb31fde5..37ddf228d1c 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/ObjectLabelProviderConfigurationItemProvider.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/provider/ObjectLabelProviderConfigurationItemProvider.java
@@ -20,9 +20,7 @@ import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
-
import org.eclipse.emf.ecore.provider.EModelElementItemProvider;
-
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -35,7 +33,6 @@ import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.NattablelabelproviderPackage;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ObjectLabelProviderConfiguration;
-
import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
/**
@@ -45,7 +42,8 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPl
* @generated
*/
public class ObjectLabelProviderConfigurationItemProvider
- extends EModelElementItemProvider
+ extends
+EModelElementItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
@@ -73,7 +71,6 @@ public class ObjectLabelProviderConfigurationItemProvider
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
- addLabelProviderContextPropertyDescriptor(object);
addDisplayIconPropertyDescriptor(object);
addDisplayLabelPropertyDescriptor(object);
}
@@ -81,28 +78,6 @@ public class ObjectLabelProviderConfigurationItemProvider
}
/**
- * This adds a property descriptor for the Label Provider Context feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addLabelProviderContextPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ILabelConfiguration_labelProviderContext_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ILabelConfiguration_labelProviderContext_feature", "_UI_ILabelConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- NattablelabelproviderPackage.Literals.ILABEL_CONFIGURATION__LABEL_PROVIDER_CONTEXT,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
* This adds a property descriptor for the Display Icon feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -165,10 +140,8 @@ public class ObjectLabelProviderConfigurationItemProvider
*/
@Override
public String getText(Object object) {
- String label = ((ObjectLabelProviderConfiguration)object).getLabelProviderContext();
- return label == null || label.length() == 0 ?
- getString("_UI_ObjectLabelProviderConfiguration_type") : //$NON-NLS-1$
- getString("_UI_ObjectLabelProviderConfiguration_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ ObjectLabelProviderConfiguration objectLabelProviderConfiguration = (ObjectLabelProviderConfiguration)object;
+ return getString("_UI_ObjectLabelProviderConfiguration_type") + " " + objectLabelProviderConfiguration.isDisplayIcon(); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -183,7 +156,6 @@ public class ObjectLabelProviderConfigurationItemProvider
updateChildren(notification);
switch (notification.getFeatureID(ObjectLabelProviderConfiguration.class)) {
- case NattablelabelproviderPackage.OBJECT_LABEL_PROVIDER_CONFIGURATION__LABEL_PROVIDER_CONTEXT:
case NattablelabelproviderPackage.OBJECT_LABEL_PROVIDER_CONFIGURATION__DISPLAY_ICON:
case NattablelabelproviderPackage.OBJECT_LABEL_PROVIDER_CONFIGURATION__DISPLAY_LABEL:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/NattableItemProviderAdapterFactory.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/NattableItemProviderAdapterFactory.java
index 910083ce1ee..3fc99014e0c 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/NattableItemProviderAdapterFactory.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/NattableItemProviderAdapterFactory.java
@@ -105,52 +105,6 @@ public class NattableItemProviderAdapterFactory extends NattableAdapterFactory i
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.IdAxis} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IdAxisItemProvider idAxisItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.IdAxis}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createIdAxisAdapter() {
- if (idAxisItemProvider == null) {
- idAxisItemProvider = new IdAxisItemProvider(this);
- }
-
- return idAxisItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.nattable.model.nattable.EObjectAxis} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EObjectAxisItemProvider eObjectAxisItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.EObjectAxis}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createEObjectAxisAdapter() {
- if (eObjectAxisItemProvider == null) {
- eObjectAxisItemProvider = new EObjectAxisItemProvider(this);
- }
-
- return eObjectAxisItemProvider;
- }
-
- /**
* This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -250,8 +204,6 @@ public class NattableItemProviderAdapterFactory extends NattableAdapterFactory i
*/
public void dispose() {
if (tableItemProvider != null) tableItemProvider.dispose();
- if (idAxisItemProvider != null) idAxisItemProvider.dispose();
- if (eObjectAxisItemProvider != null) eObjectAxisItemProvider.dispose();
}
}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/TableItemProvider.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/TableItemProvider.java
index b3c62bd37c9..758df71c3e7 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/TableItemProvider.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.edit/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/provider/TableItemProvider.java
@@ -36,10 +36,11 @@ import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.NattableconfigurationFactory;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.NattableconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationFactory;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.AbstractTableConfigurationItemProvider;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderFactory;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.TableNamedElementItemProvider;
/**
* This is the item provider adapter for a {@link org.eclipse.papyrus.infra.nattable.model.nattable.Table} object.
@@ -48,7 +49,7 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.p
* @generated
*/
public class TableItemProvider
- extends AbstractTableConfigurationItemProvider
+ extends TableNamedElementItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
@@ -77,7 +78,10 @@ public class TableItemProvider
super.getPropertyDescriptors(object);
addContextPropertyDescriptor(object);
+ addTableConfigurationPropertyDescriptor(object);
addInvertAxisPropertyDescriptor(object);
+ addCurrentRowAxisProviderPropertyDescriptor(object);
+ addCurrentColumnAxisProviderPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -105,6 +109,28 @@ public class TableItemProvider
}
/**
+ * This adds a property descriptor for the Table Configuration feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTableConfigurationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Table_tableConfiguration_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Table_tableConfiguration_feature", "_UI_Table_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattablePackage.Literals.TABLE__TABLE_CONFIGURATION,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
* This adds a property descriptor for the Invert Axis feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -127,6 +153,50 @@ public class TableItemProvider
}
/**
+ * This adds a property descriptor for the Current Row Axis Provider feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCurrentRowAxisProviderPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Table_currentRowAxisProvider_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Table_currentRowAxisProvider_feature", "_UI_Table_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattablePackage.Literals.TABLE__CURRENT_ROW_AXIS_PROVIDER,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Current Column Axis Provider feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCurrentColumnAxisProviderPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Table_currentColumnAxisProvider_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Table_currentColumnAxisProvider_feature", "_UI_Table_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ NattablePackage.Literals.TABLE__CURRENT_COLUMN_AXIS_PROVIDER,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
@@ -138,7 +208,10 @@ public class TableItemProvider
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
- childrenFeatures.add(NattablePackage.Literals.TABLE__EDITOR_CONFIGURATION);
+ childrenFeatures.add(NattablePackage.Literals.TABLE__COLUMN_AXIS_PROVIDERS_HISTORY);
+ childrenFeatures.add(NattablePackage.Literals.TABLE__ROW_AXIS_PROVIDERS_HISTORY);
+ childrenFeatures.add(NattablePackage.Literals.TABLE__LOCAL_ROW_HEADER_AXIS_CONFIGURATION);
+ childrenFeatures.add(NattablePackage.Literals.TABLE__LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION);
}
return childrenFeatures;
}
@@ -196,7 +269,10 @@ public class TableItemProvider
case NattablePackage.TABLE__INVERT_AXIS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
- case NattablePackage.TABLE__EDITOR_CONFIGURATION:
+ case NattablePackage.TABLE__COLUMN_AXIS_PROVIDERS_HISTORY:
+ case NattablePackage.TABLE__ROW_AXIS_PROVIDERS_HISTORY:
+ case NattablePackage.TABLE__LOCAL_ROW_HEADER_AXIS_CONFIGURATION:
+ case NattablePackage.TABLE__LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -216,8 +292,33 @@ public class TableItemProvider
newChildDescriptors.add
(createChildParameter
- (NattablePackage.Literals.TABLE__EDITOR_CONFIGURATION,
- NattableconfigurationFactory.eINSTANCE.createTableConfiguration()));
+ (NattablePackage.Literals.TABLE__COLUMN_AXIS_PROVIDERS_HISTORY,
+ NattableaxisproviderFactory.eINSTANCE.createSlaveObjectAxisProvider()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattablePackage.Literals.TABLE__COLUMN_AXIS_PROVIDERS_HISTORY,
+ NattableaxisproviderFactory.eINSTANCE.createMasterObjectAxisProvider()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattablePackage.Literals.TABLE__ROW_AXIS_PROVIDERS_HISTORY,
+ NattableaxisproviderFactory.eINSTANCE.createSlaveObjectAxisProvider()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattablePackage.Literals.TABLE__ROW_AXIS_PROVIDERS_HISTORY,
+ NattableaxisproviderFactory.eINSTANCE.createMasterObjectAxisProvider()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattablePackage.Literals.TABLE__LOCAL_ROW_HEADER_AXIS_CONFIGURATION,
+ NattableaxisconfigurationFactory.eINSTANCE.createLocalTableHeaderAxisConfiguration()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (NattablePackage.Literals.TABLE__LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION,
+ NattableaxisconfigurationFactory.eINSTANCE.createLocalTableHeaderAxisConfiguration()));
}
/**
@@ -232,8 +333,10 @@ public class TableItemProvider
Object childObject = child;
boolean qualify =
- childFeature == NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__ROW_AXIS_PROVIDER ||
- childFeature == NattableconfigurationPackage.Literals.ABSTRACT_TABLE_CONFIGURATION__COLUMN_AXIS_PROVIDER;
+ childFeature == NattablePackage.Literals.TABLE__COLUMN_AXIS_PROVIDERS_HISTORY ||
+ childFeature == NattablePackage.Literals.TABLE__ROW_AXIS_PROVIDERS_HISTORY ||
+ childFeature == NattablePackage.Literals.TABLE__LOCAL_ROW_HEADER_AXIS_CONFIGURATION ||
+ childFeature == NattablePackage.Literals.TABLE__LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION;
if (qualify) {
return getString
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/META-INF/MANIFEST.MF b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/META-INF/MANIFEST.MF
index 7ed6ca0f94a..ff0f55c444e 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/META-INF/MANIFEST.MF
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/META-INF/MANIFEST.MF
@@ -8,7 +8,8 @@ Bundle-Activator: org.eclipse.papyrus.infra.nattable.model.nattable.presentation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.presentation,
+Export-Package: org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.presentation,
+ org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.presentation,
org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.presentation,
org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.presentation,
org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.presentation,
@@ -16,9 +17,10 @@ Export-Package: org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisco
org.eclipse.papyrus.infra.nattable.model.nattable.presentation
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources;visibility:=reexport,
- org.eclipse.papyrus.infra.nattable.model.edit;visibility:=reexport;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.nattable.model.edit;bundle-version="0.10.0";visibility:=reexport,
org.eclipse.emf.ecore.xmi;visibility:=reexport,
org.eclipse.emf.edit.ui;visibility:=reexport,
org.eclipse.ui.ide;visibility:=reexport,
- org.eclipse.emf.ecore.edit;visibility:=reexport
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.nattable.model;bundle-version="0.10.0"
Bundle-ActivationPolicy: lazy
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/obj16/NattableaxisModelFile.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/obj16/NattableaxisModelFile.gif
new file mode 100644
index 00000000000..e5c6e175f7f
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/obj16/NattableaxisModelFile.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/wizban/NewNattableaxis.gif b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/wizban/NewNattableaxis.gif
new file mode 100644
index 00000000000..caab2147182
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/icons/full/wizban/NewNattableaxis.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/plugin.properties b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/plugin.properties
index 8d4e45b6479..6fa9b96d89e 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/plugin.properties
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/plugin.properties
@@ -104,4 +104,11 @@ _UI_NattabletesterModelWizard_description = Create a new Nattabletester model
_UI_NattabletesterEditor_label = Nattabletester Model Editor
_UI_NattabletesterEditorFilenameDefaultBase = My
_UI_NattabletesterEditorFilenameExtensions = nattabletester
- \ No newline at end of file
+
+_UI_NattableaxisEditor_menu = &Nattableaxis Editor
+ _UI_NattableaxisModelWizard_label = Nattableaxis Model
+_UI_NattableaxisModelWizard_description = Create a new Nattableaxis model
+ _UI_NattableaxisEditor_label = Nattableaxis Model Editor
+ _UI_NattableaxisEditorFilenameDefaultBase = My
+_UI_NattableaxisEditorFilenameExtensions = nattableaxis
+
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/plugin.xml b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/plugin.xml
index 45944e68f66..2ddcb928217 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/plugin.xml
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/plugin.xml
@@ -35,6 +35,18 @@
<extension point="org.eclipse.ui.editors">
<!-- @generated nattable -->
<editor
+ id="org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.presentation.NattableaxisEditorID"
+ name="%_UI_NattableaxisEditor_label"
+ icon="icons/full/obj16/NattableaxisModelFile.gif"
+ extensions="nattableaxis"
+ class="org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.presentation.NattableaxisEditor"
+ contributorClass="org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.presentation.NattableaxisActionBarContributor">
+ </editor>
+ </extension>
+
+ <extension point="org.eclipse.ui.editors">
+ <!-- @generated nattable -->
+ <editor
id="org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.presentation.NattabletesterEditorID"
name="%_UI_NattabletesterEditor_label"
icon="icons/full/obj16/NattabletesterModelFile.gif"
@@ -44,6 +56,23 @@
</editor>
</extension>
+ <extension point="org.eclipse.ui.newWizards">
+ <!-- @generated nattable -->
+ <category
+ id="org.eclipse.emf.ecore.Wizard.category.ID"
+ name="%_UI_Wizard_category"/>
+ <wizard
+ id="org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.presentation.NattableaxisModelWizardID"
+ name="%_UI_NattableaxisModelWizard_label"
+ class="org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.presentation.NattableaxisModelWizard"
+ category="org.eclipse.emf.ecore.Wizard.category.ID"
+ icon="icons/full/obj16/NattableaxisModelFile.gif">
+ <description>%_UI_NattableaxisModelWizard_description</description>
+ <selection class="org.eclipse.core.resources.IResource"/>
+ </wizard>
+ </extension>
+
+null
<extension point="org.eclipse.ui.editors">
<!-- @generated nattable -->
<editor
@@ -72,6 +101,8 @@
</wizard>
</extension>
+null
+null
<extension point="org.eclipse.ui.editors">
<!-- @generated nattable -->
<editor
@@ -101,26 +132,6 @@
</extension>
null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
<extension point="org.eclipse.ui.editors">
<!-- @generated nattable -->
<editor
@@ -150,31 +161,6 @@ null
</extension>
null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
<extension point="org.eclipse.ui.editors">
<!-- @generated nattable -->
<editor
@@ -204,32 +190,6 @@ null
</extension>
null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
<extension point="org.eclipse.ui.editors">
<!-- @generated nattable -->
<editor
@@ -258,31 +218,4 @@ null
</wizard>
</extension>
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-null
-</plugin>
+null</plugin>
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/requirement.nattableconfiguration b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/requirement.nattableconfiguration
new file mode 100644
index 00000000000..b8f5355f7e5
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/requirement.nattableconfiguration
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattableconfiguration:TableConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattabletester="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester" description="A synchronized table for SysML Requirements" name="RequirementTable" type="PapyrusSysMLRequirementTable" iconPath="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/icons/table_SysML_Requirement.gif" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
+ <creationTester xsi:type="nattabletester:JavaTableTester" tester="org.eclipse.papyrus.sysml.nattable.config.canCreateRequirementTable"/>
+ <rowHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" indexStyle="NUMERIC">
+ <ownedLabelConfiguration xsi:type="nattablelabelprovider:ObjectLabelProviderConfiguration"/>
+ <ownedAxisConfiguration xsi:type="nattableaxisconfiguration:EStructuralFeatureValueFillingConfiguration">
+ <listenFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </ownedAxisConfiguration>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.sysml.nattable.requirement.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfiguration.0" specificAxisConfiguration="//@rowHeaderAxisConfiguration/@ownedAxisConfiguration.0"/>
+ </rowHeaderAxisConfiguration>
+ <columnHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration">
+ <ownedLabelConfiguration xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.feature.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfiguration.0"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.stereotype.property.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfiguration.0"/>
+ </columnHeaderAxisConfiguration>
+ <columnAxisProviders xsi:type="nattableaxisprovider:SlaveObjectAxisProvider" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xsi:type="nattableaxis:FeatureIdAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.1" element="property_of_stereotype:/SysML::Requirements::Requirement::id"/>
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xsi:type="nattableaxis:FeatureIdAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.1" element="property_of_stereotype:/SysML::Requirements::Requirement::text"/>
+ </columnAxisProviders>
+ <rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattableconfiguration:TableConfiguration>
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisActionBarContributor.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisActionBarContributor.java
new file mode 100644
index 00000000000..eb21cc2cdaf
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisActionBarContributor.java
@@ -0,0 +1,437 @@
+/**
+ * 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.nattable.model.nattable.nattableaxis.presentation;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+
+import org.eclipse.emf.edit.ui.action.ControlAction;
+import org.eclipse.emf.edit.ui.action.CreateChildAction;
+import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.action.LoadResourceAction;
+import org.eclipse.emf.edit.ui.action.ValidateAction;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.SubContributionItem;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.Viewer;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
+
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * This is the action bar contributor for the Nattableaxis model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NattableaxisActionBarContributor
+ extends EditingDomainActionBarContributor
+ implements ISelectionChangedListener {
+ /**
+ * This keeps track of the active editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IEditorPart activeEditorPart;
+
+ /**
+ * This keeps track of the current selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelectionProvider selectionProvider;
+
+ /**
+ * This action opens the Properties view.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IAction showPropertiesViewAction =
+ new Action(NattableEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) //$NON-NLS-1$
+ {
+ @Override
+ public void run() {
+ try {
+ getPage().showView("org.eclipse.ui.views.PropertySheet"); //$NON-NLS-1$
+ }
+ catch (PartInitException exception) {
+ NattableEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * This action refreshes the viewer of the current editor if the editor
+ * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IAction refreshViewerAction =
+ new Action(NattableEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) //$NON-NLS-1$
+ {
+ @Override
+ public boolean isEnabled() {
+ return activeEditorPart instanceof IViewerProvider;
+ }
+
+ @Override
+ public void run() {
+ if (activeEditorPart instanceof IViewerProvider) {
+ Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer();
+ if (viewer != null) {
+ viewer.refresh();
+ }
+ }
+ }
+ };
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> createChildActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be added for CreateChild actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IMenuManager createChildMenuManager;
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> createSiblingActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be added for CreateSibling actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IMenuManager createSiblingMenuManager;
+
+ /**
+ * This creates an instance of the contributor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NattableaxisActionBarContributor() {
+ super(ADDITIONS_LAST_STYLE);
+ loadResourceAction = new LoadResourceAction();
+ validateAction = new ValidateAction();
+ controlAction = new ControlAction();
+ }
+
+ /**
+ * This adds Separators for editor additions to the tool bar.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void contributeToToolBar(IToolBarManager toolBarManager) {
+ toolBarManager.add(new Separator("nattableaxis-settings")); //$NON-NLS-1$
+ toolBarManager.add(new Separator("nattableaxis-additions")); //$NON-NLS-1$
+ }
+
+ /**
+ * This adds to the menu bar a menu and some separators for editor additions,
+ * as well as the sub-menus for object creation items.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void contributeToMenu(IMenuManager menuManager) {
+ super.contributeToMenu(menuManager);
+
+ IMenuManager submenuManager = new MenuManager(NattableEditorPlugin.INSTANCE.getString("_UI_NattableaxisEditor_menu"), "org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisMenuID"); //$NON-NLS-1$ //$NON-NLS-2$
+ menuManager.insertAfter("additions", submenuManager); //$NON-NLS-1$
+ submenuManager.add(new Separator("settings")); //$NON-NLS-1$
+ submenuManager.add(new Separator("actions")); //$NON-NLS-1$
+ submenuManager.add(new Separator("additions")); //$NON-NLS-1$
+ submenuManager.add(new Separator("additions-end")); //$NON-NLS-1$
+
+ // Prepare for CreateChild item addition or removal.
+ //
+ createChildMenuManager = new MenuManager(NattableEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); //$NON-NLS-1$
+ submenuManager.insertBefore("additions", createChildMenuManager); //$NON-NLS-1$
+
+ // Prepare for CreateSibling item addition or removal.
+ //
+ createSiblingMenuManager = new MenuManager(NattableEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); //$NON-NLS-1$
+ submenuManager.insertBefore("additions", createSiblingMenuManager); //$NON-NLS-1$
+
+ // Force an update because Eclipse hides empty menus now.
+ //
+ submenuManager.addMenuListener
+ (new IMenuListener() {
+ public void menuAboutToShow(IMenuManager menuManager) {
+ menuManager.updateAll(true);
+ }
+ });
+
+ addGlobalActions(submenuManager);
+ }
+
+ /**
+ * When the active editor changes, this remembers the change and registers with it as a selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setActiveEditor(IEditorPart part) {
+ super.setActiveEditor(part);
+ activeEditorPart = part;
+
+ // Switch to the new selection provider.
+ //
+ if (selectionProvider != null) {
+ selectionProvider.removeSelectionChangedListener(this);
+ }
+ if (part == null) {
+ selectionProvider = null;
+ }
+ else {
+ selectionProvider = part.getSite().getSelectionProvider();
+ selectionProvider.addSelectionChangedListener(this);
+
+ // Fake a selection changed event to update the menus.
+ //
+ if (selectionProvider.getSelection() != null) {
+ selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection()));
+ }
+ }
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
+ * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
+ * that can be added to the selected object and updating the menus accordingly.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void selectionChanged(SelectionChangedEvent event) {
+ // Remove any menu items for old selection.
+ //
+ if (createChildMenuManager != null) {
+ depopulateManager(createChildMenuManager, createChildActions);
+ }
+ if (createSiblingMenuManager != null) {
+ depopulateManager(createSiblingMenuManager, createSiblingActions);
+ }
+
+ // Query the new selection for appropriate new child/sibling descriptors
+ //
+ Collection<?> newChildDescriptors = null;
+ Collection<?> newSiblingDescriptors = null;
+
+ ISelection selection = event.getSelection();
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) {
+ Object object = ((IStructuredSelection)selection).getFirstElement();
+
+ EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain();
+
+ newChildDescriptors = domain.getNewChildDescriptors(object, null);
+ newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
+ }
+
+ // Generate actions for selection; populate and redraw the menus.
+ //
+ createChildActions = generateCreateChildActions(newChildDescriptors, selection);
+ createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
+
+ if (createChildMenuManager != null) {
+ populateManager(createChildMenuManager, createChildActions, null);
+ createChildMenuManager.update(true);
+ }
+ if (createSiblingMenuManager != null) {
+ populateManager(createSiblingMenuManager, createSiblingActions, null);
+ createSiblingMenuManager.update(true);
+ }
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateChildAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection,
+ * by inserting them before the specified contribution item <code>contributionID</code>.
+ * If <code>contributionID</code> is <code>null</code>, they are simply added.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) {
+ if (actions != null) {
+ for (IAction action : actions) {
+ if (contributionID != null) {
+ manager.insertBefore(contributionID, action);
+ }
+ else {
+ manager.add(action);
+ }
+ }
+ }
+ }
+
+ /**
+ * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
+ if (actions != null) {
+ IContributionItem[] items = manager.getItems();
+ for (int i = 0; i < items.length; i++) {
+ // Look into SubContributionItems
+ //
+ IContributionItem contributionItem = items[i];
+ while (contributionItem instanceof SubContributionItem) {
+ contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
+ }
+
+ // Delete the ActionContributionItems with matching action.
+ //
+ if (contributionItem instanceof ActionContributionItem) {
+ IAction action = ((ActionContributionItem)contributionItem).getAction();
+ if (actions.contains(action)) {
+ manager.remove(contributionItem);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This populates the pop-up menu before it appears.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager) {
+ super.menuAboutToShow(menuManager);
+ MenuManager submenuManager = null;
+
+ submenuManager = new MenuManager(NattableEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); //$NON-NLS-1$
+ populateManager(submenuManager, createChildActions, null);
+ menuManager.insertBefore("edit", submenuManager); //$NON-NLS-1$
+
+ submenuManager = new MenuManager(NattableEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); //$NON-NLS-1$
+ populateManager(submenuManager, createSiblingActions, null);
+ menuManager.insertBefore("edit", submenuManager); //$NON-NLS-1$
+ }
+
+ /**
+ * This inserts global actions before the "additions-end" separator.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void addGlobalActions(IMenuManager menuManager) {
+ menuManager.insertAfter("additions-end", new Separator("ui-actions")); //$NON-NLS-1$ //$NON-NLS-2$
+ menuManager.insertAfter("ui-actions", showPropertiesViewAction); //$NON-NLS-1$
+
+ refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
+ menuManager.insertAfter("ui-actions", refreshViewerAction); //$NON-NLS-1$
+
+ super.addGlobalActions(menuManager);
+ }
+
+ /**
+ * This ensures that a delete action will clean up all references to deleted objects.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean removeAllReferencesOnDelete() {
+ return true;
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisEditor.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisEditor.java
new file mode 100644
index 00000000000..b920dca3147
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisEditor.java
@@ -0,0 +1,1806 @@
+/**
+ * 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.nattable.model.nattable.nattableaxis.presentation;
+
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EventObject;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.ViewerPane;
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+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.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+import org.eclipse.emf.edit.ui.util.EditUIUtil;
+import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.provider.NattableaxisItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider.NattableaxisconfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider.NattableaxisproviderItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.NattableconfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider.NattablelabelproviderItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider.NattabletesterItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableItemProviderAdapterFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabFolder;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.dialogs.SaveAsDialog;
+import org.eclipse.ui.ide.IGotoMarker;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.MultiPageEditorPart;
+import org.eclipse.ui.views.contentoutline.ContentOutline;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.PropertySheet;
+import org.eclipse.ui.views.properties.PropertySheetPage;
+
+
+/**
+ * This is an example of a Nattableaxis model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NattableaxisEditor
+ extends MultiPageEditorPart
+ implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker {
+ /**
+ * This keeps track of the editing domain that is used to track all changes to the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AdapterFactoryEditingDomain editingDomain;
+
+ /**
+ * This is the one adapter factory used for providing views of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory adapterFactory;
+
+ /**
+ * This is the content outline page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IContentOutlinePage contentOutlinePage;
+
+ /**
+ * This is a kludge...
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IStatusLineManager contentOutlineStatusLineManager;
+
+ /**
+ * This is the content outline page's viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer contentOutlineViewer;
+
+ /**
+ * This is the property sheet page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<PropertySheetPage> propertySheetPages = new ArrayList<PropertySheetPage>();
+
+ /**
+ * This is the viewer that shadows the selection in the content outline.
+ * The parent relation must be correctly defined for this to work.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer selectionViewer;
+
+ /**
+ * This inverts the roll of parent and child in the content provider and show parents as a tree.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer parentViewer;
+
+ /**
+ * This shows how a tree view works.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer treeViewer;
+
+ /**
+ * This shows how a list view works.
+ * A list viewer doesn't support icons.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ListViewer listViewer;
+
+ /**
+ * This shows how a table view works.
+ * A table can be used as a list with icons.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TableViewer tableViewer;
+
+ /**
+ * This shows how a tree view with columns works.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer treeViewerWithColumns;
+
+ /**
+ * This keeps track of the active viewer pane, in the book.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ViewerPane currentViewerPane;
+
+ /**
+ * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Viewer currentViewer;
+
+ /**
+ * This listens to which ever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelectionChangedListener selectionChangedListener;
+
+ /**
+ * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<ISelectionChangedListener> selectionChangedListeners = new ArrayList<ISelectionChangedListener>();
+
+ /**
+ * This keeps track of the selection of the editor as a whole.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelection editorSelection = StructuredSelection.EMPTY;
+
+ /**
+ * The MarkerHelper is responsible for creating workspace resource markers presented
+ * in Eclipse's Problems View.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MarkerHelper markerHelper = new EditUIMarkerHelper();
+
+ /**
+ * This listens for when the outline becomes active
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IPartListener partListener =
+ new IPartListener() {
+ public void partActivated(IWorkbenchPart p) {
+ if (p instanceof ContentOutline) {
+ if (((ContentOutline)p).getCurrentPage() == NattableaxisEditor.this.contentOutlinePage) {
+ getActionBarContributor().setActiveEditor(NattableaxisEditor.this);
+
+ setCurrentViewer(NattableaxisEditor.this.contentOutlineViewer);
+ }
+ }
+ else if (p instanceof PropertySheet) {
+ if (NattableaxisEditor.this.propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
+ getActionBarContributor().setActiveEditor(NattableaxisEditor.this);
+ handleActivate();
+ }
+ }
+ else if (p == NattableaxisEditor.this) {
+ handleActivate();
+ }
+ }
+ public void partBroughtToTop(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partClosed(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partDeactivated(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partOpened(IWorkbenchPart p) {
+ // Ignore.
+ }
+ };
+
+ /**
+ * Resources that have been removed since last activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ /**
+ * Resources that have been changed since last activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+
+ /**
+ * Resources that have been saved.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> savedResources = new ArrayList<Resource>();
+
+ /**
+ * Map to store the diagnostic associated with a resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Map<Resource, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<Resource, Diagnostic>();
+
+ /**
+ * Controls whether the problem indication should be updated.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean updateProblemIndication = true;
+
+ /**
+ * Adapter used to update the problem indication when resources are demanded loaded.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EContentAdapter problemIndicationAdapter =
+ new EContentAdapter() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (notification.getNotifier() instanceof Resource) {
+ switch (notification.getFeatureID(Resource.class)) {
+ case Resource.RESOURCE__IS_LOADED:
+ case Resource.RESOURCE__ERRORS:
+ case Resource.RESOURCE__WARNINGS: {
+ Resource resource = (Resource)notification.getNotifier();
+ Diagnostic diagnostic = analyzeResourceProblems(resource, null);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ NattableaxisEditor.this.resourceToDiagnosticMap.put(resource, diagnostic);
+ }
+ else {
+ NattableaxisEditor.this.resourceToDiagnosticMap.remove(resource);
+ }
+
+ if (NattableaxisEditor.this.updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ break;
+ }
+ }
+ }
+ else {
+ super.notifyChanged(notification);
+ }
+ }
+
+ @Override
+ protected void setTarget(Resource target) {
+ basicSetTarget(target);
+ }
+
+ @Override
+ protected void unsetTarget(Resource target) {
+ basicUnsetTarget(target);
+ NattableaxisEditor.this.resourceToDiagnosticMap.remove(target);
+ if (NattableaxisEditor.this.updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ }
+ };
+
+ /**
+ * This listens for workspace changes.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IResourceChangeListener resourceChangeListener =
+ new IResourceChangeListener() {
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta delta = event.getDelta();
+ try {
+ class ResourceDeltaVisitor implements IResourceDeltaVisitor {
+ protected ResourceSet resourceSet = NattableaxisEditor.this.editingDomain.getResourceSet();
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ public boolean visit(IResourceDelta delta) {
+ if (delta.getResource().getType() == IResource.FILE) {
+ if (delta.getKind() == IResourceDelta.REMOVED ||
+ delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
+ Resource resource = this.resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
+ if (resource != null) {
+ if (delta.getKind() == IResourceDelta.REMOVED) {
+ this.removedResources.add(resource);
+ }
+ else if (!NattableaxisEditor.this.savedResources.remove(resource)) {
+ this.changedResources.add(resource);
+ }
+ }
+ }
+ return false;
+ }
+
+ return true;
+ }
+
+ public Collection<Resource> getChangedResources() {
+ return this.changedResources;
+ }
+
+ public Collection<Resource> getRemovedResources() {
+ return this.removedResources;
+ }
+ }
+
+ final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();
+ delta.accept(visitor);
+
+ if (!visitor.getRemovedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ NattableaxisEditor.this.removedResources.addAll(visitor.getRemovedResources());
+ if (!isDirty()) {
+ getSite().getPage().closeEditor(NattableaxisEditor.this, false);
+ }
+ }
+ });
+ }
+
+ if (!visitor.getChangedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ NattableaxisEditor.this.changedResources.addAll(visitor.getChangedResources());
+ if (getSite().getPage().getActiveEditor() == NattableaxisEditor.this) {
+ handleActivate();
+ }
+ }
+ });
+ }
+ }
+ catch (CoreException exception) {
+ NattableEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * Handles activation of the editor or it's associated views.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void handleActivate() {
+ // Recompute the read only state.
+ //
+ if (this.editingDomain.getResourceToReadOnlyMap() != null) {
+ this.editingDomain.getResourceToReadOnlyMap().clear();
+
+ // Refresh any actions that may become enabled or disabled.
+ //
+ setSelection(getSelection());
+ }
+
+ if (!this.removedResources.isEmpty()) {
+ if (handleDirtyConflict()) {
+ getSite().getPage().closeEditor(NattableaxisEditor.this, false);
+ }
+ else {
+ this.removedResources.clear();
+ this.changedResources.clear();
+ this.savedResources.clear();
+ }
+ }
+ else if (!this.changedResources.isEmpty()) {
+ this.changedResources.removeAll(this.savedResources);
+ handleChangedResources();
+ this.changedResources.clear();
+ this.savedResources.clear();
+ }
+ }
+
+ /**
+ * Handles what to do with changed resources on activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void handleChangedResources() {
+ if (!this.changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
+ if (isDirty()) {
+ this.changedResources.addAll(this.editingDomain.getResourceSet().getResources());
+ }
+ this.editingDomain.getCommandStack().flush();
+
+ this.updateProblemIndication = false;
+ for (Resource resource : this.changedResources) {
+ if (resource.isLoaded()) {
+ resource.unload();
+ try {
+ resource.load(Collections.EMPTY_MAP);
+ }
+ catch (IOException exception) {
+ if (!this.resourceToDiagnosticMap.containsKey(resource)) {
+ this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ }
+ }
+ }
+
+ if (AdapterFactoryEditingDomain.isStale(this.editorSelection)) {
+ setSelection(StructuredSelection.EMPTY);
+ }
+
+ this.updateProblemIndication = true;
+ updateProblemIndication();
+ }
+ }
+
+ /**
+ * Updates the problems indication with the information described in the specified diagnostic.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void updateProblemIndication() {
+ if (this.updateProblemIndication) {
+ BasicDiagnostic diagnostic =
+ new BasicDiagnostic
+ (Diagnostic.OK,
+ "org.eclipse.papyrus.infra.nattable.model.editor", //$NON-NLS-1$
+ 0,
+ null,
+ new Object [] { this.editingDomain.getResourceSet() });
+ for (Diagnostic childDiagnostic : this.resourceToDiagnosticMap.values()) {
+ if (childDiagnostic.getSeverity() != Diagnostic.OK) {
+ diagnostic.add(childDiagnostic);
+ }
+ }
+
+ int lastEditorPage = getPageCount() - 1;
+ if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) {
+ ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ setActivePage(lastEditorPage);
+ }
+ }
+ else if (diagnostic.getSeverity() != Diagnostic.OK) {
+ ProblemEditorPart problemEditorPart = new ProblemEditorPart();
+ problemEditorPart.setDiagnostic(diagnostic);
+ problemEditorPart.setMarkerHelper(this.markerHelper);
+ try {
+ addPage(++lastEditorPage, problemEditorPart, getEditorInput());
+ setPageText(lastEditorPage, problemEditorPart.getPartName());
+ setActivePage(lastEditorPage);
+ showTabs();
+ }
+ catch (PartInitException exception) {
+ NattableEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+
+ if (this.markerHelper.hasMarkers(this.editingDomain.getResourceSet())) {
+ this.markerHelper.deleteMarkers(this.editingDomain.getResourceSet());
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ try {
+ this.markerHelper.createMarkers(diagnostic);
+ }
+ catch (CoreException exception) {
+ NattableEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Shows a dialog that asks if conflicting changes should be discarded.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean handleDirtyConflict() {
+ return
+ MessageDialog.openQuestion
+ (getSite().getShell(),
+ getString("_UI_FileConflict_label"), //$NON-NLS-1$
+ getString("_WARN_FileConflict")); //$NON-NLS-1$
+ }
+
+ /**
+ * This creates a model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NattableaxisEditor() {
+ super();
+ initializeEditingDomain();
+ }
+
+ /**
+ * This sets up the editing domain for the model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void initializeEditingDomain() {
+ // Create an adapter factory that yields item providers.
+ //
+ this.adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ this.adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisproviderItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattablelabelproviderItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattabletesterItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+
+ // Create the command stack that will notify this editor as commands are executed.
+ //
+ BasicCommandStack commandStack = new BasicCommandStack();
+
+ // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
+ //
+ commandStack.addCommandStackListener
+ (new CommandStackListener() {
+ public void commandStackChanged(final EventObject event) {
+ getContainer().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+
+ // Try to select the affected objects.
+ //
+ Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
+ if (mostRecentCommand != null) {
+ setSelectionToViewer(mostRecentCommand.getAffectedObjects());
+ }
+ for (Iterator<PropertySheetPage> i = NattableaxisEditor.this.propertySheetPages.iterator(); i.hasNext(); ) {
+ PropertySheetPage propertySheetPage = i.next();
+ if (propertySheetPage.getControl().isDisposed()) {
+ i.remove();
+ }
+ else {
+ propertySheetPage.refresh();
+ }
+ }
+ }
+ });
+ }
+ });
+
+ // Create the editing domain with a special command stack.
+ //
+ this.editingDomain = new AdapterFactoryEditingDomain(this.adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ }
+
+ /**
+ * This is here for the listener to be able to call it.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void firePropertyChange(int action) {
+ super.firePropertyChange(action);
+ }
+
+ /**
+ * This sets the selection into whichever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelectionToViewer(Collection<?> collection) {
+ final Collection<?> theSelection = collection;
+ // Make sure it's okay.
+ //
+ if (theSelection != null && !theSelection.isEmpty()) {
+ Runnable runnable =
+ new Runnable() {
+ public void run() {
+ // Try to select the items in the current content viewer of the editor.
+ //
+ if (NattableaxisEditor.this.currentViewer != null) {
+ NattableaxisEditor.this.currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
+ }
+ }
+ };
+ getSite().getShell().getDisplay().asyncExec(runnable);
+ }
+ }
+
+ /**
+ * This returns the editing domain as required by the {@link IEditingDomainProvider} interface.
+ * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain}
+ * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditingDomain getEditingDomain() {
+ return this.editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object [] getElements(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object [] getChildren(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ Object parent = super.getParent(object);
+ return parent != null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getParent(Object object) {
+ return null;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCurrentViewerPane(ViewerPane viewerPane) {
+ if (this.currentViewerPane != viewerPane) {
+ if (this.currentViewerPane != null) {
+ this.currentViewerPane.showFocus(false);
+ }
+ this.currentViewerPane = viewerPane;
+ }
+ setCurrentViewer(this.currentViewerPane.getViewer());
+ }
+
+ /**
+ * This makes sure that one content viewer, either for the current page or the outline view, if it has focus,
+ * is the current one.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCurrentViewer(Viewer viewer) {
+ // If it is changing...
+ //
+ if (this.currentViewer != viewer) {
+ if (this.selectionChangedListener == null) {
+ // Create the listener on demand.
+ //
+ this.selectionChangedListener =
+ new ISelectionChangedListener() {
+ // This just notifies those things that are affected by the section.
+ //
+ public void selectionChanged(SelectionChangedEvent selectionChangedEvent) {
+ setSelection(selectionChangedEvent.getSelection());
+ }
+ };
+ }
+
+ // Stop listening to the old one.
+ //
+ if (this.currentViewer != null) {
+ this.currentViewer.removeSelectionChangedListener(this.selectionChangedListener);
+ }
+
+ // Start listening to the new one.
+ //
+ if (viewer != null) {
+ viewer.addSelectionChangedListener(this.selectionChangedListener);
+ }
+
+ // Remember it.
+ //
+ this.currentViewer = viewer;
+
+ // Set the editors selection based on the current viewer's selection.
+ //
+ setSelection(this.currentViewer == null ? StructuredSelection.EMPTY : this.currentViewer.getSelection());
+ }
+ }
+
+ /**
+ * This returns the viewer as required by the {@link IViewerProvider} interface.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Viewer getViewer() {
+ return this.currentViewer;
+ }
+
+ /**
+ * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createContextMenuFor(StructuredViewer viewer) {
+ MenuManager contextMenu = new MenuManager("#PopUp"); //$NON-NLS-1$
+ contextMenu.add(new Separator("additions")); //$NON-NLS-1$
+ contextMenu.setRemoveAllWhenShown(true);
+ contextMenu.addMenuListener(this);
+ Menu menu= contextMenu.createContextMenu(viewer.getControl());
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));
+
+ int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
+ Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
+ viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(this.editingDomain, viewer));
+ }
+
+ /**
+ * This is the method called to load a resource into the editing domain's resource set based on the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createModel() {
+ URI resourceURI = EditUIUtil.getURI(getEditorInput());
+ Exception exception = null;
+ Resource resource = null;
+ try {
+ // Load the resource through the editing domain.
+ //
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, true);
+ }
+ catch (Exception e) {
+ exception = e;
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, false);
+ }
+
+ Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ this.editingDomain.getResourceSet().eAdapters().add(this.problemIndicationAdapter);
+ }
+
+ /**
+ * Returns a diagnostic describing the errors and warnings listed in the resource
+ * and the specified exception (if any).
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) {
+ if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
+ BasicDiagnostic basicDiagnostic =
+ new BasicDiagnostic
+ (Diagnostic.ERROR,
+ "org.eclipse.papyrus.infra.nattable.model.editor", //$NON-NLS-1$
+ 0,
+ getString("_UI_CreateModelError_message", resource.getURI()), //$NON-NLS-1$
+ new Object [] { exception == null ? (Object)resource : exception });
+ basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));
+ return basicDiagnostic;
+ }
+ else if (exception != null) {
+ return
+ new BasicDiagnostic
+ (Diagnostic.ERROR,
+ "org.eclipse.papyrus.infra.nattable.model.editor", //$NON-NLS-1$
+ 0,
+ getString("_UI_CreateModelError_message", resource.getURI()), //$NON-NLS-1$
+ new Object[] { exception });
+ }
+ else {
+ return Diagnostic.OK_INSTANCE;
+ }
+ }
+
+ /**
+ * This is the method used by the framework to install your own controls.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void createPages() {
+ // Creates the model from the editor input
+ //
+ createModel();
+
+ // Only creates the other pages if there is something that can be edited
+ //
+ if (!getEditingDomain().getResourceSet().getResources().isEmpty()) {
+ // Create a page for the selection tree view.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), NattableaxisEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ this.selectionViewer = (TreeViewer)viewerPane.getViewer();
+ this.selectionViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+
+ this.selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
+ this.selectionViewer.setInput(this.editingDomain.getResourceSet());
+ this.selectionViewer.setSelection(new StructuredSelection(this.editingDomain.getResourceSet().getResources().get(0)), true);
+ viewerPane.setTitle(this.editingDomain.getResourceSet());
+
+ new AdapterFactoryTreeEditor(this.selectionViewer.getTree(), this.adapterFactory);
+
+ createContextMenuFor(this.selectionViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
+ }
+
+ // Create a page for the parent tree view.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), NattableaxisEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ this.parentViewer = (TreeViewer)viewerPane.getViewer();
+ this.parentViewer.setAutoExpandLevel(30);
+ this.parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(this.adapterFactory));
+ this.parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
+
+ createContextMenuFor(this.parentViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ParentPage_label")); //$NON-NLS-1$
+ }
+
+ // This is the page for the list viewer
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), NattableaxisEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new ListViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ this.listViewer = (ListViewer)viewerPane.getViewer();
+ this.listViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.listViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
+
+ createContextMenuFor(this.listViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ListPage_label")); //$NON-NLS-1$
+ }
+
+ // This is the page for the tree viewer
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), NattableaxisEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ this.treeViewer = (TreeViewer)viewerPane.getViewer();
+ this.treeViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
+
+ new AdapterFactoryTreeEditor(this.treeViewer.getTree(), this.adapterFactory);
+
+ createContextMenuFor(this.treeViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreePage_label")); //$NON-NLS-1$
+ }
+
+ // This is the page for the table viewer.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), NattableaxisEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TableViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ this.tableViewer = (TableViewer)viewerPane.getViewer();
+
+ Table table = this.tableViewer.getTable();
+ TableLayout layout = new TableLayout();
+ table.setLayout(layout);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ TableColumn objectColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(3, 100, true));
+ objectColumn.setText(getString("_UI_ObjectColumn_label")); //$NON-NLS-1$
+ objectColumn.setResizable(true);
+
+ TableColumn selfColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(2, 100, true));
+ selfColumn.setText(getString("_UI_SelfColumn_label")); //$NON-NLS-1$
+ selfColumn.setResizable(true);
+
+ this.tableViewer.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
+ this.tableViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
+
+ createContextMenuFor(this.tableViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TablePage_label")); //$NON-NLS-1$
+ }
+
+ // This is the page for the table tree viewer.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), NattableaxisEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ this.treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
+
+ Tree tree = this.treeViewerWithColumns.getTree();
+ tree.setLayoutData(new FillLayout());
+ tree.setHeaderVisible(true);
+ tree.setLinesVisible(true);
+
+ TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE);
+ objectColumn.setText(getString("_UI_ObjectColumn_label")); //$NON-NLS-1$
+ objectColumn.setResizable(true);
+ objectColumn.setWidth(250);
+
+ TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE);
+ selfColumn.setText(getString("_UI_SelfColumn_label")); //$NON-NLS-1$
+ selfColumn.setResizable(true);
+ selfColumn.setWidth(200);
+
+ this.treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
+ this.treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
+
+ createContextMenuFor(this.treeViewerWithColumns);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); //$NON-NLS-1$
+ }
+
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ setActivePage(0);
+ }
+ });
+ }
+
+ // Ensures that this editor will only display the page's tab
+ // area if there are more than one page
+ //
+ getContainer().addControlListener
+ (new ControlAdapter() {
+ boolean guard = false;
+ @Override
+ public void controlResized(ControlEvent event) {
+ if (!this.guard) {
+ this.guard = true;
+ hideTabs();
+ this.guard = false;
+ }
+ }
+ });
+
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+
+ /**
+ * If there is just one page in the multi-page editor part,
+ * this hides the single tab at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void hideTabs() {
+ if (getPageCount() <= 1) {
+ setPageText(0, ""); //$NON-NLS-1$
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder)getContainer()).setTabHeight(1);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y + 6);
+ }
+ }
+ }
+
+ /**
+ * If there is more than one page in the multi-page editor part,
+ * this shows the tabs at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void showTabs() {
+ if (getPageCount() > 1) {
+ setPageText(0, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y - 6);
+ }
+ }
+ }
+
+ /**
+ * This is used to track the active viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void pageChange(int pageIndex) {
+ super.pageChange(pageIndex);
+
+ if (this.contentOutlinePage != null) {
+ handleContentOutlineSelection(this.contentOutlinePage.getSelection());
+ }
+ }
+
+ /**
+ * This is how the framework determines which interfaces we implement.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("rawtypes")
+ @Override
+ public Object getAdapter(Class key) {
+ if (key.equals(IContentOutlinePage.class)) {
+ return showOutlineView() ? getContentOutlinePage() : null;
+ }
+ else if (key.equals(IPropertySheetPage.class)) {
+ return getPropertySheetPage();
+ }
+ else if (key.equals(IGotoMarker.class)) {
+ return this;
+ }
+ else {
+ return super.getAdapter(key);
+ }
+ }
+
+ /**
+ * This accesses a cached version of the content outliner.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IContentOutlinePage getContentOutlinePage() {
+ if (this.contentOutlinePage == null) {
+ // The content outline is just a tree.
+ //
+ class MyContentOutlinePage extends ContentOutlinePage {
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ NattableaxisEditor.this.contentOutlineViewer = getTreeViewer();
+ NattableaxisEditor.this.contentOutlineViewer.addSelectionChangedListener(this);
+
+ // Set up the tree viewer.
+ //
+ NattableaxisEditor.this.contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(NattableaxisEditor.this.adapterFactory));
+ NattableaxisEditor.this.contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(NattableaxisEditor.this.adapterFactory));
+ NattableaxisEditor.this.contentOutlineViewer.setInput(NattableaxisEditor.this.editingDomain.getResourceSet());
+
+ // Make sure our popups work.
+ //
+ createContextMenuFor(NattableaxisEditor.this.contentOutlineViewer);
+
+ if (!NattableaxisEditor.this.editingDomain.getResourceSet().getResources().isEmpty()) {
+ // Select the root object in the view.
+ //
+ NattableaxisEditor.this.contentOutlineViewer.setSelection(new StructuredSelection(NattableaxisEditor.this.editingDomain.getResourceSet().getResources().get(0)), true);
+ }
+ }
+
+ @Override
+ public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
+ super.makeContributions(menuManager, toolBarManager, statusLineManager);
+ NattableaxisEditor.this.contentOutlineStatusLineManager = statusLineManager;
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ }
+
+ this.contentOutlinePage = new MyContentOutlinePage();
+
+ // Listen to selection so that we can handle it is a special way.
+ //
+ this.contentOutlinePage.addSelectionChangedListener
+ (new ISelectionChangedListener() {
+ // This ensures that we handle selections correctly.
+ //
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleContentOutlineSelection(event.getSelection());
+ }
+ });
+ }
+
+ return this.contentOutlinePage;
+ }
+
+ /**
+ * This accesses a cached version of the property sheet.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IPropertySheetPage getPropertySheetPage() {
+ PropertySheetPage propertySheetPage =
+ new ExtendedPropertySheetPage(this.editingDomain) {
+ @Override
+ public void setSelectionToViewer(List<?> selection) {
+ NattableaxisEditor.this.setSelectionToViewer(selection);
+ NattableaxisEditor.this.setFocus();
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ };
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.propertySheetPages.add(propertySheetPage);
+
+ return propertySheetPage;
+ }
+
+ /**
+ * This deals with how we want selection in the outliner to affect the other views.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void handleContentOutlineSelection(ISelection selection) {
+ if (this.currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator();
+ if (selectedElements.hasNext()) {
+ // Get the first selected element.
+ //
+ Object selectedElement = selectedElements.next();
+
+ // If it's the selection viewer, then we want it to select the same selection as this selection.
+ //
+ if (this.currentViewerPane.getViewer() == this.selectionViewer) {
+ ArrayList<Object> selectionList = new ArrayList<Object>();
+ selectionList.add(selectedElement);
+ while (selectedElements.hasNext()) {
+ selectionList.add(selectedElements.next());
+ }
+
+ // Set the selection to the widget.
+ //
+ this.selectionViewer.setSelection(new StructuredSelection(selectionList));
+ }
+ else {
+ // Set the input to the widget.
+ //
+ if (this.currentViewerPane.getViewer().getInput() != selectedElement) {
+ this.currentViewerPane.getViewer().setInput(selectedElement);
+ this.currentViewerPane.setTitle(selectedElement);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply tests the command stack.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isDirty() {
+ return ((BasicCommandStack)this.editingDomain.getCommandStack()).isSaveNeeded();
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply saves the model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public void doSave(IProgressMonitor progressMonitor) {
+ // Save only resources that have actually changed.
+ //
+ final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
+ saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);
+ saveOptions.put(XMIResource.OPTION_SAVE_TYPE_INFORMATION, true);
+ // Do the work within an operation because this is a long running activity that modifies the workbench.
+ //
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ // This is the method that gets invoked when the operation runs.
+ //
+ @Override
+ public void execute(IProgressMonitor monitor) {
+ // Save the resources to the file system.
+ //
+ boolean first = true;
+ for (Resource resource : NattableaxisEditor.this.editingDomain.getResourceSet().getResources()) {
+ if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !NattableaxisEditor.this.editingDomain.isReadOnly(resource)) {
+ try {
+ long timeStamp = resource.getTimeStamp();
+ resource.save(saveOptions);
+ if (resource.getTimeStamp() != timeStamp) {
+ NattableaxisEditor.this.savedResources.add(resource);
+ }
+ }
+ catch (Exception exception) {
+ NattableaxisEditor.this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ first = false;
+ }
+ }
+ }
+ };
+
+ this.updateProblemIndication = false;
+ try {
+ // This runs the options, and shows progress.
+ //
+ new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);
+
+ // Refresh the necessary state.
+ //
+ ((BasicCommandStack)this.editingDomain.getCommandStack()).saveIsDone();
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ catch (Exception exception) {
+ // Something went wrong that shouldn't.
+ //
+ NattableEditorPlugin.INSTANCE.log(exception);
+ }
+ this.updateProblemIndication = true;
+ updateProblemIndication();
+ }
+
+ /**
+ * This returns whether something has been persisted to the URI of the specified resource.
+ * The implementation uses the URI converter from the editor's resource set to try to open an input stream.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean isPersisted(Resource resource) {
+ boolean result = false;
+ try {
+ InputStream stream = this.editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ if (stream != null) {
+ result = true;
+ stream.close();
+ }
+ }
+ catch (IOException e) {
+ // Ignore
+ }
+ return result;
+ }
+
+ /**
+ * This always returns true because it is not currently supported.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ return true;
+ }
+
+ /**
+ * This also changes the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void doSaveAs() {
+ SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
+ saveAsDialog.open();
+ IPath path = saveAsDialog.getResult();
+ if (path != null) {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ if (file != null) {
+ doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void doSaveAs(URI uri, IEditorInput editorInput) {
+ (this.editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ IProgressMonitor progressMonitor =
+ getActionBars().getStatusLineManager() != null ?
+ getActionBars().getStatusLineManager().getProgressMonitor() :
+ new NullProgressMonitor();
+ doSave(progressMonitor);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void gotoMarker(IMarker marker) {
+ List<?> targetObjects = this.markerHelper.getTargetObjects(this.editingDomain, marker);
+ if (!targetObjects.isEmpty()) {
+ setSelectionToViewer(targetObjects);
+ }
+ }
+
+ /**
+ * This is called during startup.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput editorInput) {
+ setSite(site);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ site.setSelectionProvider(this);
+ site.getPage().addPartListener(this.partListener);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this.resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setFocus() {
+ if (this.currentViewerPane != null) {
+ this.currentViewerPane.setFocus();
+ }
+ else {
+ getControl(getActivePage()).setFocus();
+ }
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ this.selectionChangedListeners.add(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+ this.selectionChangedListeners.remove(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ISelection getSelection() {
+ return this.editorSelection;
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection.
+ * Calling this result will notify the listeners.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelection(ISelection selection) {
+ this.editorSelection = selection;
+
+ for (ISelectionChangedListener listener : this.selectionChangedListeners) {
+ listener.selectionChanged(new SelectionChangedEvent(this, selection));
+ }
+ setStatusLineManager(selection);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStatusLineManager(ISelection selection) {
+ IStatusLineManager statusLineManager = this.currentViewer != null && this.currentViewer == this.contentOutlineViewer ?
+ this.contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+
+ if (statusLineManager != null) {
+ if (selection instanceof IStructuredSelection) {
+ Collection<?> collection = ((IStructuredSelection)selection).toList();
+ switch (collection.size()) {
+ case 0: {
+ statusLineManager.setMessage(getString("_UI_NoObjectSelected")); //$NON-NLS-1$
+ break;
+ }
+ case 1: {
+ String text = new AdapterFactoryItemDelegator(this.adapterFactory).getText(collection.iterator().next());
+ statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); //$NON-NLS-1$
+ break;
+ }
+ default: {
+ statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); //$NON-NLS-1$
+ break;
+ }
+ }
+ }
+ else {
+ statusLineManager.setMessage(""); //$NON-NLS-1$
+ }
+ }
+ }
+
+ /**
+ * This looks up a string in the plugin's plugin.properties file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static String getString(String key) {
+ return NattableEditorPlugin.INSTANCE.getString(key);
+ }
+
+ /**
+ * This looks up a string in plugin.properties, making a substitution.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static String getString(String key, Object s1) {
+ return NattableEditorPlugin.INSTANCE.getString(key, new Object [] { s1 });
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void menuAboutToShow(IMenuManager menuManager) {
+ ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditingDomainActionBarContributor getActionBarContributor() {
+ return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IActionBars getActionBars() {
+ return getActionBarContributor().getActionBars();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AdapterFactory getAdapterFactory() {
+ return this.adapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ this.updateProblemIndication = false;
+
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this.resourceChangeListener);
+
+ getSite().getPage().removePartListener(this.partListener);
+
+ this.adapterFactory.dispose();
+
+ if (getActionBarContributor().getActiveEditor() == this) {
+ getActionBarContributor().setActiveEditor(null);
+ }
+
+ for (PropertySheetPage propertySheetPage : this.propertySheetPages) {
+ propertySheetPage.dispose();
+ }
+
+ if (this.contentOutlinePage != null) {
+ this.contentOutlinePage.dispose();
+ }
+
+ super.dispose();
+ }
+
+ /**
+ * Returns whether the outline view should be presented to the user.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean showOutlineView() {
+ return true;
+ }
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisModelWizard.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisModelWizard.java
new file mode 100644
index 00000000000..a2c681e8d70
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxis/presentation/NattableaxisModelWizard.java
@@ -0,0 +1,640 @@
+/**
+ * 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.nattable.model.nattable.nattableaxis.presentation;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.StringTokenizer;
+
+import org.eclipse.emf.common.CommonPlugin;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.ModifyEvent;
+
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.ISetSelectionTarget;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableEditPlugin;
+
+
+import org.eclipse.core.runtime.Path;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
+
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+
+
+/**
+ * This is a simple wizard for creating a new model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NattableaxisModelWizard extends Wizard implements INewWizard {
+ /**
+ * The supported extensions for created files.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<String> FILE_EXTENSIONS =
+ Collections.unmodifiableList(Arrays.asList(NattableEditorPlugin.INSTANCE.getString("_UI_NattableaxisEditorFilenameExtensions").split("\\s*,\\s*"))); //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * A formatted list of supported file extensions, suitable for display.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String FORMATTED_FILE_EXTENSIONS =
+ NattableEditorPlugin.INSTANCE.getString("_UI_NattableaxisEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ /**
+ * This caches an instance of the model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NattableaxisPackage nattableaxisPackage = NattableaxisPackage.eINSTANCE;
+
+ /**
+ * This caches an instance of the model factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NattableaxisFactory nattableaxisFactory = nattableaxisPackage.getNattableaxisFactory();
+
+ /**
+ * This is the file creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NattableaxisModelWizardNewFileCreationPage newFileCreationPage;
+
+ /**
+ * This is the initial object creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NattableaxisModelWizardInitialObjectCreationPage initialObjectCreationPage;
+
+ /**
+ * Remember the selection during initialization for populating the default container.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IStructuredSelection selection;
+
+ /**
+ * Remember the workbench during initialization.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IWorkbench workbench;
+
+ /**
+ * Caches the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<String> initialObjectNames;
+
+ /**
+ * This just records the information.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
+ this.selection = selection;
+ setWindowTitle(NattableEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); //$NON-NLS-1$
+ setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(NattableEditorPlugin.INSTANCE.getImage("full/wizban/NewNattableaxis"))); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<String> getInitialObjectNames() {
+ if (initialObjectNames == null) {
+ initialObjectNames = new ArrayList<String>();
+ for (EClassifier eClassifier : nattableaxisPackage.getEClassifiers()) {
+ if (eClassifier instanceof EClass) {
+ EClass eClass = (EClass)eClassifier;
+ if (!eClass.isAbstract()) {
+ initialObjectNames.add(eClass.getName());
+ }
+ }
+ }
+ Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
+ }
+ return initialObjectNames;
+ }
+
+ /**
+ * Create a new model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EObject createInitialModel() {
+ EClass eClass = (EClass)nattableaxisPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
+ EObject rootObject = nattableaxisFactory.create(eClass);
+ return rootObject;
+ }
+
+ /**
+ * Do the work after everything is specified.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean performFinish() {
+ try {
+ // Remember the file.
+ //
+ final IFile modelFile = getModelFile();
+
+ // Do the work within an operation.
+ //
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ @Override
+ protected void execute(IProgressMonitor progressMonitor) {
+ try {
+ // Create a resource set
+ //
+ ResourceSet resourceSet = new ResourceSetImpl();
+
+ // Get the URI of the model file.
+ //
+ URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
+
+ // Create a resource for this file.
+ //
+ Resource resource = resourceSet.createResource(fileURI);
+
+ // Add the initial model object to the contents.
+ //
+ EObject rootObject = createInitialModel();
+ if (rootObject != null) {
+ resource.getContents().add(rootObject);
+ }
+
+ // Save the contents of the resource to the file system.
+ //
+ Map<Object, Object> options = new HashMap<Object, Object>();
+ options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
+ resource.save(options);
+ }
+ catch (Exception exception) {
+ NattableEditorPlugin.INSTANCE.log(exception);
+ }
+ finally {
+ progressMonitor.done();
+ }
+ }
+ };
+
+ getContainer().run(false, false, operation);
+
+ // Select the new file resource in the current view.
+ //
+ IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbenchWindow.getActivePage();
+ final IWorkbenchPart activePart = page.getActivePart();
+ if (activePart instanceof ISetSelectionTarget) {
+ final ISelection targetSelection = new StructuredSelection(modelFile);
+ getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ ((ISetSelectionTarget)activePart).selectReveal(targetSelection);
+ }
+ });
+ }
+
+ // Open an editor on the new file.
+ //
+ try {
+ page.openEditor
+ (new FileEditorInput(modelFile),
+ workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
+ }
+ catch (PartInitException exception) {
+ MessageDialog.openError(workbenchWindow.getShell(), NattableEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); //$NON-NLS-1$
+ return false;
+ }
+
+ return true;
+ }
+ catch (Exception exception) {
+ NattableEditorPlugin.INSTANCE.log(exception);
+ return false;
+ }
+ }
+
+ /**
+ * This is the one page of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class NattableaxisModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NattableaxisModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) {
+ super(pageId, selection);
+ }
+
+ /**
+ * The framework calls this to see if the file is correct.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean validatePage() {
+ if (super.validatePage()) {
+ String extension = new Path(getFileName()).getFileExtension();
+ if (extension == null || !FILE_EXTENSIONS.contains(extension)) {
+ String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; //$NON-NLS-1$ //$NON-NLS-2$
+ setErrorMessage(NattableEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS }));
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IFile getModelFile() {
+ return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName()));
+ }
+ }
+
+ /**
+ * This is the page where the type of object to create is selected.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class NattableaxisModelWizardInitialObjectCreationPage extends WizardPage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Combo initialObjectField;
+
+ /**
+ * @generated
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ protected List<String> encodings;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Combo encodingField;
+
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NattableaxisModelWizardInitialObjectCreationPage(String pageId) {
+ super(pageId);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE); {
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 1;
+ layout.verticalSpacing = 12;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.grabExcessVerticalSpace = true;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+ }
+
+ Label containerLabel = new Label(composite, SWT.LEFT);
+ {
+ containerLabel.setText(NattableEditorPlugin.INSTANCE.getString("_UI_ModelObject")); //$NON-NLS-1$
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ containerLabel.setLayoutData(data);
+ }
+
+ initialObjectField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ initialObjectField.setLayoutData(data);
+ }
+
+ for (String objectName : getInitialObjectNames()) {
+ initialObjectField.add(getLabel(objectName));
+ }
+
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.select(0);
+ }
+ initialObjectField.addModifyListener(validator);
+
+ Label encodingLabel = new Label(composite, SWT.LEFT);
+ {
+ encodingLabel.setText(NattableEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); //$NON-NLS-1$
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ encodingLabel.setLayoutData(data);
+ }
+ encodingField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ encodingField.setLayoutData(data);
+ }
+
+ for (String encoding : getEncodings()) {
+ encodingField.add(encoding);
+ }
+
+ encodingField.select(0);
+ encodingField.addModifyListener(validator);
+
+ setPageComplete(validatePage());
+ setControl(composite);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModifyListener validator =
+ new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ setPageComplete(validatePage());
+ }
+ };
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean validatePage() {
+ return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setVisible(boolean visible) {
+ super.setVisible(visible);
+ if (visible) {
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.clearSelection();
+ encodingField.setFocus();
+ }
+ else {
+ encodingField.clearSelection();
+ initialObjectField.setFocus();
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getInitialObjectName() {
+ String label = initialObjectField.getText();
+
+ for (String name : getInitialObjectNames()) {
+ if (getLabel(name).equals(label)) {
+ return name;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getEncoding() {
+ return encodingField.getText();
+ }
+
+ /**
+ * Returns the label for the specified type name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected String getLabel(String typeName) {
+ try {
+ return NattableEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ catch(MissingResourceException mre) {
+ NattableEditorPlugin.INSTANCE.log(mre);
+ }
+ return typeName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<String> getEncodings() {
+ if (encodings == null) {
+ encodings = new ArrayList<String>();
+ for (StringTokenizer stringTokenizer = new StringTokenizer(NattableEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) //$NON-NLS-1$
+ {
+ encodings.add(stringTokenizer.nextToken());
+ }
+ }
+ return encodings;
+ }
+ }
+
+ /**
+ * The framework calls this to create the contents of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void addPages() {
+ // Create a page, set the title, and the initial model file name.
+ //
+ newFileCreationPage = new NattableaxisModelWizardNewFileCreationPage("Whatever", selection); //$NON-NLS-1$
+ newFileCreationPage.setTitle(NattableEditorPlugin.INSTANCE.getString("_UI_NattableaxisModelWizard_label")); //$NON-NLS-1$
+ newFileCreationPage.setDescription(NattableEditorPlugin.INSTANCE.getString("_UI_NattableaxisModelWizard_description")); //$NON-NLS-1$
+ newFileCreationPage.setFileName(NattableEditorPlugin.INSTANCE.getString("_UI_NattableaxisEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0)); //$NON-NLS-1$ //$NON-NLS-2$
+ addPage(newFileCreationPage);
+
+ // Try and get the resource selection to determine a current directory for the file dialog.
+ //
+ if (selection != null && !selection.isEmpty()) {
+ // Get the resource...
+ //
+ Object selectedElement = selection.iterator().next();
+ if (selectedElement instanceof IResource) {
+ // Get the resource parent, if its a file.
+ //
+ IResource selectedResource = (IResource)selectedElement;
+ if (selectedResource.getType() == IResource.FILE) {
+ selectedResource = selectedResource.getParent();
+ }
+
+ // This gives us a directory...
+ //
+ if (selectedResource instanceof IFolder || selectedResource instanceof IProject) {
+ // Set this for the container.
+ //
+ newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());
+
+ // Make up a unique new name here.
+ //
+ String defaultModelBaseFilename = NattableEditorPlugin.INSTANCE.getString("_UI_NattableaxisEditorFilenameDefaultBase"); //$NON-NLS-1$
+ String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0);
+ String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; //$NON-NLS-1$
+ for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) {
+ modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension; //$NON-NLS-1$
+ }
+ newFileCreationPage.setFileName(modelFilename);
+ }
+ }
+ }
+ initialObjectCreationPage = new NattableaxisModelWizardInitialObjectCreationPage("Whatever2"); //$NON-NLS-1$
+ initialObjectCreationPage.setTitle(NattableEditorPlugin.INSTANCE.getString("_UI_NattableaxisModelWizard_label")); //$NON-NLS-1$
+ initialObjectCreationPage.setDescription(NattableEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); //$NON-NLS-1$
+ addPage(initialObjectCreationPage);
+ }
+
+ /**
+ * Get the file from the page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IFile getModelFile() {
+ return newFileCreationPage.getModelFile();
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/presentation/NattableaxisconfigurationEditor.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/presentation/NattableaxisconfigurationEditor.java
index 757c6a8534e..19b1b3a758a 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/presentation/NattableaxisconfigurationEditor.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisconfiguration/presentation/NattableaxisconfigurationEditor.java
@@ -15,7 +15,6 @@ package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfigurat
import java.io.IOException;
import java.io.InputStream;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -34,24 +33,56 @@ import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.ResourcesPlugin;
-
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.ViewerPane;
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+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.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+import org.eclipse.emf.edit.ui.util.EditUIUtil;
+import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
-
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-
import org.eclipse.jface.util.LocalSelectionTransfer;
-
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -65,29 +96,29 @@ import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
-
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.provider.NattableaxisItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider.NattableaxisconfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider.NattableaxisproviderItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.NattableconfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider.NattablelabelproviderItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider.NattabletesterItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableItemProviderAdapterFactory;
import org.eclipse.swt.SWT;
-
import org.eclipse.swt.custom.CTabFolder;
-
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.Transfer;
-
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
-
import org.eclipse.swt.graphics.Point;
-
import org.eclipse.swt.layout.FillLayout;
-
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
-
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -95,92 +126,18 @@ import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
-
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.SaveAsDialog;
-
import org.eclipse.ui.ide.IGotoMarker;
-
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
-
import org.eclipse.ui.views.contentoutline.ContentOutline;
import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.PropertySheet;
import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.command.CommandStackListener;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.ui.MarkerHelper;
-import org.eclipse.emf.common.ui.ViewerPane;
-
-import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
-
-import org.eclipse.emf.common.ui.viewer.IViewerProvider;
-
-import org.eclipse.emf.common.util.BasicDiagnostic;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.common.util.URI;
-
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-import org.eclipse.emf.ecore.util.EContentAdapter;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-
-import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
-
-import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
-
-import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
-
-import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
-
-import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
-import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
-import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
-
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
-
-import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
-import org.eclipse.emf.edit.ui.util.EditUIUtil;
-
-import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider.NattableaxisconfigurationItemProviderAdapterFactory;
-
-import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider.NattableaxisproviderItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.NattableconfigurationItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider.NattablelabelproviderItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider.NattabletesterItemProviderAdapterFactory;
-import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableItemProviderAdapterFactory;
-
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
/**
* This is an example of a Nattableaxisconfiguration model editor.
@@ -349,14 +306,14 @@ public class NattableaxisconfigurationEditor
new IPartListener() {
public void partActivated(IWorkbenchPart p) {
if (p instanceof ContentOutline) {
- if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
+ if (((ContentOutline)p).getCurrentPage() == NattableaxisconfigurationEditor.this.contentOutlinePage) {
getActionBarContributor().setActiveEditor(NattableaxisconfigurationEditor.this);
- setCurrentViewer(contentOutlineViewer);
+ setCurrentViewer(NattableaxisconfigurationEditor.this.contentOutlineViewer);
}
}
else if (p instanceof PropertySheet) {
- if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
+ if (NattableaxisconfigurationEditor.this.propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
getActionBarContributor().setActiveEditor(NattableaxisconfigurationEditor.this);
handleActivate();
}
@@ -437,13 +394,13 @@ public class NattableaxisconfigurationEditor
Resource resource = (Resource)notification.getNotifier();
Diagnostic diagnostic = analyzeResourceProblems(resource, null);
if (diagnostic.getSeverity() != Diagnostic.OK) {
- resourceToDiagnosticMap.put(resource, diagnostic);
+ NattableaxisconfigurationEditor.this.resourceToDiagnosticMap.put(resource, diagnostic);
}
else {
- resourceToDiagnosticMap.remove(resource);
+ NattableaxisconfigurationEditor.this.resourceToDiagnosticMap.remove(resource);
}
- if (updateProblemIndication) {
+ if (NattableaxisconfigurationEditor.this.updateProblemIndication) {
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
@@ -468,8 +425,8 @@ public class NattableaxisconfigurationEditor
@Override
protected void unsetTarget(Resource target) {
basicUnsetTarget(target);
- resourceToDiagnosticMap.remove(target);
- if (updateProblemIndication) {
+ NattableaxisconfigurationEditor.this.resourceToDiagnosticMap.remove(target);
+ if (NattableaxisconfigurationEditor.this.updateProblemIndication) {
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
@@ -492,7 +449,7 @@ public class NattableaxisconfigurationEditor
IResourceDelta delta = event.getDelta();
try {
class ResourceDeltaVisitor implements IResourceDeltaVisitor {
- protected ResourceSet resourceSet = editingDomain.getResourceSet();
+ protected ResourceSet resourceSet = NattableaxisconfigurationEditor.this.editingDomain.getResourceSet();
protected Collection<Resource> changedResources = new ArrayList<Resource>();
protected Collection<Resource> removedResources = new ArrayList<Resource>();
@@ -500,13 +457,13 @@ public class NattableaxisconfigurationEditor
if (delta.getResource().getType() == IResource.FILE) {
if (delta.getKind() == IResourceDelta.REMOVED ||
delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
- Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
+ Resource resource = this.resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
if (resource != null) {
if (delta.getKind() == IResourceDelta.REMOVED) {
- removedResources.add(resource);
+ this.removedResources.add(resource);
}
- else if (!savedResources.remove(resource)) {
- changedResources.add(resource);
+ else if (!NattableaxisconfigurationEditor.this.savedResources.remove(resource)) {
+ this.changedResources.add(resource);
}
}
}
@@ -517,11 +474,11 @@ public class NattableaxisconfigurationEditor
}
public Collection<Resource> getChangedResources() {
- return changedResources;
+ return this.changedResources;
}
public Collection<Resource> getRemovedResources() {
- return removedResources;
+ return this.removedResources;
}
}
@@ -532,7 +489,7 @@ public class NattableaxisconfigurationEditor
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
- removedResources.addAll(visitor.getRemovedResources());
+ NattableaxisconfigurationEditor.this.removedResources.addAll(visitor.getRemovedResources());
if (!isDirty()) {
getSite().getPage().closeEditor(NattableaxisconfigurationEditor.this, false);
}
@@ -544,7 +501,7 @@ public class NattableaxisconfigurationEditor
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
- changedResources.addAll(visitor.getChangedResources());
+ NattableaxisconfigurationEditor.this.changedResources.addAll(visitor.getChangedResources());
if (getSite().getPage().getActiveEditor() == NattableaxisconfigurationEditor.this) {
handleActivate();
}
@@ -567,29 +524,29 @@ public class NattableaxisconfigurationEditor
protected void handleActivate() {
// Recompute the read only state.
//
- if (editingDomain.getResourceToReadOnlyMap() != null) {
- editingDomain.getResourceToReadOnlyMap().clear();
+ if (this.editingDomain.getResourceToReadOnlyMap() != null) {
+ this.editingDomain.getResourceToReadOnlyMap().clear();
// Refresh any actions that may become enabled or disabled.
//
setSelection(getSelection());
}
- if (!removedResources.isEmpty()) {
+ if (!this.removedResources.isEmpty()) {
if (handleDirtyConflict()) {
getSite().getPage().closeEditor(NattableaxisconfigurationEditor.this, false);
}
else {
- removedResources.clear();
- changedResources.clear();
- savedResources.clear();
+ this.removedResources.clear();
+ this.changedResources.clear();
+ this.savedResources.clear();
}
}
- else if (!changedResources.isEmpty()) {
- changedResources.removeAll(savedResources);
+ else if (!this.changedResources.isEmpty()) {
+ this.changedResources.removeAll(this.savedResources);
handleChangedResources();
- changedResources.clear();
- savedResources.clear();
+ this.changedResources.clear();
+ this.savedResources.clear();
}
}
@@ -600,32 +557,32 @@ public class NattableaxisconfigurationEditor
* @generated
*/
protected void handleChangedResources() {
- if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
+ if (!this.changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
if (isDirty()) {
- changedResources.addAll(editingDomain.getResourceSet().getResources());
+ this.changedResources.addAll(this.editingDomain.getResourceSet().getResources());
}
- editingDomain.getCommandStack().flush();
+ this.editingDomain.getCommandStack().flush();
- updateProblemIndication = false;
- for (Resource resource : changedResources) {
+ this.updateProblemIndication = false;
+ for (Resource resource : this.changedResources) {
if (resource.isLoaded()) {
resource.unload();
try {
resource.load(Collections.EMPTY_MAP);
}
catch (IOException exception) {
- if (!resourceToDiagnosticMap.containsKey(resource)) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ if (!this.resourceToDiagnosticMap.containsKey(resource)) {
+ this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
}
}
}
- if (AdapterFactoryEditingDomain.isStale(editorSelection)) {
+ if (AdapterFactoryEditingDomain.isStale(this.editorSelection)) {
setSelection(StructuredSelection.EMPTY);
}
- updateProblemIndication = true;
+ this.updateProblemIndication = true;
updateProblemIndication();
}
}
@@ -637,15 +594,15 @@ public class NattableaxisconfigurationEditor
* @generated
*/
protected void updateProblemIndication() {
- if (updateProblemIndication) {
+ if (this.updateProblemIndication) {
BasicDiagnostic diagnostic =
new BasicDiagnostic
(Diagnostic.OK,
"org.eclipse.papyrus.infra.nattable.model.editor", //$NON-NLS-1$
0,
null,
- new Object [] { editingDomain.getResourceSet() });
- for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) {
+ new Object [] { this.editingDomain.getResourceSet() });
+ for (Diagnostic childDiagnostic : this.resourceToDiagnosticMap.values()) {
if (childDiagnostic.getSeverity() != Diagnostic.OK) {
diagnostic.add(childDiagnostic);
}
@@ -661,7 +618,7 @@ public class NattableaxisconfigurationEditor
else if (diagnostic.getSeverity() != Diagnostic.OK) {
ProblemEditorPart problemEditorPart = new ProblemEditorPart();
problemEditorPart.setDiagnostic(diagnostic);
- problemEditorPart.setMarkerHelper(markerHelper);
+ problemEditorPart.setMarkerHelper(this.markerHelper);
try {
addPage(++lastEditorPage, problemEditorPart, getEditorInput());
setPageText(lastEditorPage, problemEditorPart.getPartName());
@@ -673,11 +630,11 @@ public class NattableaxisconfigurationEditor
}
}
- if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
- markerHelper.deleteMarkers(editingDomain.getResourceSet());
+ if (this.markerHelper.hasMarkers(this.editingDomain.getResourceSet())) {
+ this.markerHelper.deleteMarkers(this.editingDomain.getResourceSet());
if (diagnostic.getSeverity() != Diagnostic.OK) {
try {
- markerHelper.createMarkers(diagnostic);
+ this.markerHelper.createMarkers(diagnostic);
}
catch (CoreException exception) {
NattableEditorPlugin.INSTANCE.log(exception);
@@ -721,17 +678,18 @@ public class NattableaxisconfigurationEditor
protected void initializeEditingDomain() {
// Create an adapter factory that yields item providers.
//
- adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
-
- adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableconfigurationItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableaxisproviderItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattablelabelproviderItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableaxisconfigurationItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattabletesterItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+ this.adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ this.adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisproviderItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattablelabelproviderItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattabletesterItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
// Create the command stack that will notify this editor as commands are executed.
//
@@ -753,7 +711,7 @@ public class NattableaxisconfigurationEditor
if (mostRecentCommand != null) {
setSelectionToViewer(mostRecentCommand.getAffectedObjects());
}
- for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
+ for (Iterator<PropertySheetPage> i = NattableaxisconfigurationEditor.this.propertySheetPages.iterator(); i.hasNext(); ) {
PropertySheetPage propertySheetPage = i.next();
if (propertySheetPage.getControl().isDisposed()) {
i.remove();
@@ -769,7 +727,7 @@ public class NattableaxisconfigurationEditor
// Create the editing domain with a special command stack.
//
- editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ this.editingDomain = new AdapterFactoryEditingDomain(this.adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
/**
@@ -799,8 +757,8 @@ public class NattableaxisconfigurationEditor
public void run() {
// Try to select the items in the current content viewer of the editor.
//
- if (currentViewer != null) {
- currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
+ if (NattableaxisconfigurationEditor.this.currentViewer != null) {
+ NattableaxisconfigurationEditor.this.currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
}
}
};
@@ -817,7 +775,7 @@ public class NattableaxisconfigurationEditor
* @generated
*/
public EditingDomain getEditingDomain() {
- return editingDomain;
+ return this.editingDomain;
}
/**
@@ -885,13 +843,13 @@ public class NattableaxisconfigurationEditor
* @generated
*/
public void setCurrentViewerPane(ViewerPane viewerPane) {
- if (currentViewerPane != viewerPane) {
- if (currentViewerPane != null) {
- currentViewerPane.showFocus(false);
+ if (this.currentViewerPane != viewerPane) {
+ if (this.currentViewerPane != null) {
+ this.currentViewerPane.showFocus(false);
}
- currentViewerPane = viewerPane;
+ this.currentViewerPane = viewerPane;
}
- setCurrentViewer(currentViewerPane.getViewer());
+ setCurrentViewer(this.currentViewerPane.getViewer());
}
/**
@@ -904,11 +862,11 @@ public class NattableaxisconfigurationEditor
public void setCurrentViewer(Viewer viewer) {
// If it is changing...
//
- if (currentViewer != viewer) {
- if (selectionChangedListener == null) {
+ if (this.currentViewer != viewer) {
+ if (this.selectionChangedListener == null) {
// Create the listener on demand.
//
- selectionChangedListener =
+ this.selectionChangedListener =
new ISelectionChangedListener() {
// This just notifies those things that are affected by the section.
//
@@ -920,23 +878,23 @@ public class NattableaxisconfigurationEditor
// Stop listening to the old one.
//
- if (currentViewer != null) {
- currentViewer.removeSelectionChangedListener(selectionChangedListener);
+ if (this.currentViewer != null) {
+ this.currentViewer.removeSelectionChangedListener(this.selectionChangedListener);
}
// Start listening to the new one.
//
if (viewer != null) {
- viewer.addSelectionChangedListener(selectionChangedListener);
+ viewer.addSelectionChangedListener(this.selectionChangedListener);
}
// Remember it.
//
- currentViewer = viewer;
+ this.currentViewer = viewer;
// Set the editors selection based on the current viewer's selection.
//
- setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());
+ setSelection(this.currentViewer == null ? StructuredSelection.EMPTY : this.currentViewer.getSelection());
}
}
@@ -947,7 +905,7 @@ public class NattableaxisconfigurationEditor
* @generated
*/
public Viewer getViewer() {
- return currentViewer;
+ return this.currentViewer;
}
/**
@@ -968,7 +926,7 @@ public class NattableaxisconfigurationEditor
int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
- viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(this.editingDomain, viewer));
}
/**
@@ -984,18 +942,18 @@ public class NattableaxisconfigurationEditor
try {
// Load the resource through the editing domain.
//
- resource = editingDomain.getResourceSet().getResource(resourceURI, true);
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, true);
}
catch (Exception e) {
exception = e;
- resource = editingDomain.getResourceSet().getResource(resourceURI, false);
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, false);
}
Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
if (diagnostic.getSeverity() != Diagnostic.OK) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
- editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);
+ this.editingDomain.getResourceSet().eAdapters().add(this.problemIndicationAdapter);
}
/**
@@ -1065,17 +1023,17 @@ public class NattableaxisconfigurationEditor
};
viewerPane.createControl(getContainer());
- selectionViewer = (TreeViewer)viewerPane.getViewer();
- selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ this.selectionViewer = (TreeViewer)viewerPane.getViewer();
+ this.selectionViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
- selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- selectionViewer.setInput(editingDomain.getResourceSet());
- selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
- viewerPane.setTitle(editingDomain.getResourceSet());
+ this.selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
+ this.selectionViewer.setInput(this.editingDomain.getResourceSet());
+ this.selectionViewer.setSelection(new StructuredSelection(this.editingDomain.getResourceSet().getResources().get(0)), true);
+ viewerPane.setTitle(this.editingDomain.getResourceSet());
- new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
+ new AdapterFactoryTreeEditor(this.selectionViewer.getTree(), this.adapterFactory);
- createContextMenuFor(selectionViewer);
+ createContextMenuFor(this.selectionViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
}
@@ -1099,12 +1057,12 @@ public class NattableaxisconfigurationEditor
};
viewerPane.createControl(getContainer());
- parentViewer = (TreeViewer)viewerPane.getViewer();
- parentViewer.setAutoExpandLevel(30);
- parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
- parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.parentViewer = (TreeViewer)viewerPane.getViewer();
+ this.parentViewer.setAutoExpandLevel(30);
+ this.parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(this.adapterFactory));
+ this.parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(parentViewer);
+ createContextMenuFor(this.parentViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_ParentPage_label")); //$NON-NLS-1$
}
@@ -1125,11 +1083,11 @@ public class NattableaxisconfigurationEditor
}
};
viewerPane.createControl(getContainer());
- listViewer = (ListViewer)viewerPane.getViewer();
- listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.listViewer = (ListViewer)viewerPane.getViewer();
+ this.listViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.listViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(listViewer);
+ createContextMenuFor(this.listViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_ListPage_label")); //$NON-NLS-1$
}
@@ -1150,13 +1108,13 @@ public class NattableaxisconfigurationEditor
}
};
viewerPane.createControl(getContainer());
- treeViewer = (TreeViewer)viewerPane.getViewer();
- treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.treeViewer = (TreeViewer)viewerPane.getViewer();
+ this.treeViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
+ new AdapterFactoryTreeEditor(this.treeViewer.getTree(), this.adapterFactory);
- createContextMenuFor(treeViewer);
+ createContextMenuFor(this.treeViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TreePage_label")); //$NON-NLS-1$
}
@@ -1177,9 +1135,9 @@ public class NattableaxisconfigurationEditor
}
};
viewerPane.createControl(getContainer());
- tableViewer = (TableViewer)viewerPane.getViewer();
+ this.tableViewer = (TableViewer)viewerPane.getViewer();
- Table table = tableViewer.getTable();
+ Table table = this.tableViewer.getTable();
TableLayout layout = new TableLayout();
table.setLayout(layout);
table.setHeaderVisible(true);
@@ -1195,11 +1153,11 @@ public class NattableaxisconfigurationEditor
selfColumn.setText(getString("_UI_SelfColumn_label")); //$NON-NLS-1$
selfColumn.setResizable(true);
- tableViewer.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
- tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.tableViewer.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
+ this.tableViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(tableViewer);
+ createContextMenuFor(this.tableViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TablePage_label")); //$NON-NLS-1$
}
@@ -1221,9 +1179,9 @@ public class NattableaxisconfigurationEditor
};
viewerPane.createControl(getContainer());
- treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
+ this.treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
- Tree tree = treeViewerWithColumns.getTree();
+ Tree tree = this.treeViewerWithColumns.getTree();
tree.setLayoutData(new FillLayout());
tree.setHeaderVisible(true);
tree.setLinesVisible(true);
@@ -1238,11 +1196,11 @@ public class NattableaxisconfigurationEditor
selfColumn.setResizable(true);
selfColumn.setWidth(200);
- treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
- treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
+ this.treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(treeViewerWithColumns);
+ createContextMenuFor(this.treeViewerWithColumns);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); //$NON-NLS-1$
}
@@ -1263,10 +1221,10 @@ public class NattableaxisconfigurationEditor
boolean guard = false;
@Override
public void controlResized(ControlEvent event) {
- if (!guard) {
- guard = true;
+ if (!this.guard) {
+ this.guard = true;
hideTabs();
- guard = false;
+ this.guard = false;
}
}
});
@@ -1325,8 +1283,8 @@ public class NattableaxisconfigurationEditor
protected void pageChange(int pageIndex) {
super.pageChange(pageIndex);
- if (contentOutlinePage != null) {
- handleContentOutlineSelection(contentOutlinePage.getSelection());
+ if (this.contentOutlinePage != null) {
+ handleContentOutlineSelection(this.contentOutlinePage.getSelection());
}
}
@@ -1360,37 +1318,37 @@ public class NattableaxisconfigurationEditor
* @generated
*/
public IContentOutlinePage getContentOutlinePage() {
- if (contentOutlinePage == null) {
+ if (this.contentOutlinePage == null) {
// The content outline is just a tree.
//
class MyContentOutlinePage extends ContentOutlinePage {
@Override
public void createControl(Composite parent) {
super.createControl(parent);
- contentOutlineViewer = getTreeViewer();
- contentOutlineViewer.addSelectionChangedListener(this);
+ NattableaxisconfigurationEditor.this.contentOutlineViewer = getTreeViewer();
+ NattableaxisconfigurationEditor.this.contentOutlineViewer.addSelectionChangedListener(this);
// Set up the tree viewer.
//
- contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- contentOutlineViewer.setInput(editingDomain.getResourceSet());
+ NattableaxisconfigurationEditor.this.contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(NattableaxisconfigurationEditor.this.adapterFactory));
+ NattableaxisconfigurationEditor.this.contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(NattableaxisconfigurationEditor.this.adapterFactory));
+ NattableaxisconfigurationEditor.this.contentOutlineViewer.setInput(NattableaxisconfigurationEditor.this.editingDomain.getResourceSet());
// Make sure our popups work.
//
- createContextMenuFor(contentOutlineViewer);
+ createContextMenuFor(NattableaxisconfigurationEditor.this.contentOutlineViewer);
- if (!editingDomain.getResourceSet().getResources().isEmpty()) {
+ if (!NattableaxisconfigurationEditor.this.editingDomain.getResourceSet().getResources().isEmpty()) {
// Select the root object in the view.
//
- contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ NattableaxisconfigurationEditor.this.contentOutlineViewer.setSelection(new StructuredSelection(NattableaxisconfigurationEditor.this.editingDomain.getResourceSet().getResources().get(0)), true);
}
}
@Override
public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
super.makeContributions(menuManager, toolBarManager, statusLineManager);
- contentOutlineStatusLineManager = statusLineManager;
+ NattableaxisconfigurationEditor.this.contentOutlineStatusLineManager = statusLineManager;
}
@Override
@@ -1400,11 +1358,11 @@ public class NattableaxisconfigurationEditor
}
}
- contentOutlinePage = new MyContentOutlinePage();
+ this.contentOutlinePage = new MyContentOutlinePage();
// Listen to selection so that we can handle it is a special way.
//
- contentOutlinePage.addSelectionChangedListener
+ this.contentOutlinePage.addSelectionChangedListener
(new ISelectionChangedListener() {
// This ensures that we handle selections correctly.
//
@@ -1414,7 +1372,7 @@ public class NattableaxisconfigurationEditor
});
}
- return contentOutlinePage;
+ return this.contentOutlinePage;
}
/**
@@ -1425,7 +1383,7 @@ public class NattableaxisconfigurationEditor
*/
public IPropertySheetPage getPropertySheetPage() {
PropertySheetPage propertySheetPage =
- new ExtendedPropertySheetPage(editingDomain) {
+ new ExtendedPropertySheetPage(this.editingDomain) {
@Override
public void setSelectionToViewer(List<?> selection) {
NattableaxisconfigurationEditor.this.setSelectionToViewer(selection);
@@ -1438,8 +1396,8 @@ public class NattableaxisconfigurationEditor
getActionBarContributor().shareGlobalActions(this, actionBars);
}
};
- propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
- propertySheetPages.add(propertySheetPage);
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.propertySheetPages.add(propertySheetPage);
return propertySheetPage;
}
@@ -1451,7 +1409,7 @@ public class NattableaxisconfigurationEditor
* @generated
*/
public void handleContentOutlineSelection(ISelection selection) {
- if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ if (this.currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator();
if (selectedElements.hasNext()) {
// Get the first selected element.
@@ -1460,7 +1418,7 @@ public class NattableaxisconfigurationEditor
// If it's the selection viewer, then we want it to select the same selection as this selection.
//
- if (currentViewerPane.getViewer() == selectionViewer) {
+ if (this.currentViewerPane.getViewer() == this.selectionViewer) {
ArrayList<Object> selectionList = new ArrayList<Object>();
selectionList.add(selectedElement);
while (selectedElements.hasNext()) {
@@ -1469,14 +1427,14 @@ public class NattableaxisconfigurationEditor
// Set the selection to the widget.
//
- selectionViewer.setSelection(new StructuredSelection(selectionList));
+ this.selectionViewer.setSelection(new StructuredSelection(selectionList));
}
else {
// Set the input to the widget.
//
- if (currentViewerPane.getViewer().getInput() != selectedElement) {
- currentViewerPane.getViewer().setInput(selectedElement);
- currentViewerPane.setTitle(selectedElement);
+ if (this.currentViewerPane.getViewer().getInput() != selectedElement) {
+ this.currentViewerPane.getViewer().setInput(selectedElement);
+ this.currentViewerPane.setTitle(selectedElement);
}
}
}
@@ -1491,14 +1449,15 @@ public class NattableaxisconfigurationEditor
*/
@Override
public boolean isDirty() {
- return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
+ return ((BasicCommandStack)this.editingDomain.getCommandStack()).isSaveNeeded();
}
/**
* This is for implementing {@link IEditorPart} and simply saves the model file.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ *
+ * @generated NOT
*/
@Override
public void doSave(IProgressMonitor progressMonitor) {
@@ -1507,7 +1466,7 @@ public class NattableaxisconfigurationEditor
final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);
-
+ saveOptions.put(XMIResource.OPTION_SAVE_TYPE_INFORMATION, true);
// Do the work within an operation because this is a long running activity that modifies the workbench.
//
WorkspaceModifyOperation operation =
@@ -1519,17 +1478,17 @@ public class NattableaxisconfigurationEditor
// Save the resources to the file system.
//
boolean first = true;
- for (Resource resource : editingDomain.getResourceSet().getResources()) {
- if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
+ for (Resource resource : NattableaxisconfigurationEditor.this.editingDomain.getResourceSet().getResources()) {
+ if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !NattableaxisconfigurationEditor.this.editingDomain.isReadOnly(resource)) {
try {
long timeStamp = resource.getTimeStamp();
resource.save(saveOptions);
if (resource.getTimeStamp() != timeStamp) {
- savedResources.add(resource);
+ NattableaxisconfigurationEditor.this.savedResources.add(resource);
}
}
catch (Exception exception) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ NattableaxisconfigurationEditor.this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
first = false;
}
@@ -1537,7 +1496,7 @@ public class NattableaxisconfigurationEditor
}
};
- updateProblemIndication = false;
+ this.updateProblemIndication = false;
try {
// This runs the options, and shows progress.
//
@@ -1545,7 +1504,7 @@ public class NattableaxisconfigurationEditor
// Refresh the necessary state.
//
- ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
+ ((BasicCommandStack)this.editingDomain.getCommandStack()).saveIsDone();
firePropertyChange(IEditorPart.PROP_DIRTY);
}
catch (Exception exception) {
@@ -1553,7 +1512,7 @@ public class NattableaxisconfigurationEditor
//
NattableEditorPlugin.INSTANCE.log(exception);
}
- updateProblemIndication = true;
+ this.updateProblemIndication = true;
updateProblemIndication();
}
@@ -1567,7 +1526,7 @@ public class NattableaxisconfigurationEditor
protected boolean isPersisted(Resource resource) {
boolean result = false;
try {
- InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ InputStream stream = this.editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
if (stream != null) {
result = true;
stream.close();
@@ -1615,7 +1574,7 @@ public class NattableaxisconfigurationEditor
* @generated
*/
protected void doSaveAs(URI uri, IEditorInput editorInput) {
- (editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ (this.editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
IProgressMonitor progressMonitor =
@@ -1631,7 +1590,7 @@ public class NattableaxisconfigurationEditor
* @generated
*/
public void gotoMarker(IMarker marker) {
- List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker);
+ List<?> targetObjects = this.markerHelper.getTargetObjects(this.editingDomain, marker);
if (!targetObjects.isEmpty()) {
setSelectionToViewer(targetObjects);
}
@@ -1649,8 +1608,8 @@ public class NattableaxisconfigurationEditor
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
site.setSelectionProvider(this);
- site.getPage().addPartListener(partListener);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
+ site.getPage().addPartListener(this.partListener);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this.resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
}
/**
@@ -1660,8 +1619,8 @@ public class NattableaxisconfigurationEditor
*/
@Override
public void setFocus() {
- if (currentViewerPane != null) {
- currentViewerPane.setFocus();
+ if (this.currentViewerPane != null) {
+ this.currentViewerPane.setFocus();
}
else {
getControl(getActivePage()).setFocus();
@@ -1675,7 +1634,7 @@ public class NattableaxisconfigurationEditor
* @generated
*/
public void addSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.add(listener);
+ this.selectionChangedListeners.add(listener);
}
/**
@@ -1685,7 +1644,7 @@ public class NattableaxisconfigurationEditor
* @generated
*/
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.remove(listener);
+ this.selectionChangedListeners.remove(listener);
}
/**
@@ -1695,7 +1654,7 @@ public class NattableaxisconfigurationEditor
* @generated
*/
public ISelection getSelection() {
- return editorSelection;
+ return this.editorSelection;
}
/**
@@ -1706,9 +1665,9 @@ public class NattableaxisconfigurationEditor
* @generated
*/
public void setSelection(ISelection selection) {
- editorSelection = selection;
+ this.editorSelection = selection;
- for (ISelectionChangedListener listener : selectionChangedListeners) {
+ for (ISelectionChangedListener listener : this.selectionChangedListeners) {
listener.selectionChanged(new SelectionChangedEvent(this, selection));
}
setStatusLineManager(selection);
@@ -1720,8 +1679,8 @@ public class NattableaxisconfigurationEditor
* @generated
*/
public void setStatusLineManager(ISelection selection) {
- IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?
- contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+ IStatusLineManager statusLineManager = this.currentViewer != null && this.currentViewer == this.contentOutlineViewer ?
+ this.contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
if (statusLineManager != null) {
if (selection instanceof IStructuredSelection) {
@@ -1732,7 +1691,7 @@ public class NattableaxisconfigurationEditor
break;
}
case 1: {
- String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
+ String text = new AdapterFactoryItemDelegator(this.adapterFactory).getText(collection.iterator().next());
statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); //$NON-NLS-1$
break;
}
@@ -1802,7 +1761,7 @@ public class NattableaxisconfigurationEditor
* @generated
*/
public AdapterFactory getAdapterFactory() {
- return adapterFactory;
+ return this.adapterFactory;
}
/**
@@ -1812,24 +1771,24 @@ public class NattableaxisconfigurationEditor
*/
@Override
public void dispose() {
- updateProblemIndication = false;
+ this.updateProblemIndication = false;
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this.resourceChangeListener);
- getSite().getPage().removePartListener(partListener);
+ getSite().getPage().removePartListener(this.partListener);
- adapterFactory.dispose();
+ this.adapterFactory.dispose();
if (getActionBarContributor().getActiveEditor() == this) {
getActionBarContributor().setActiveEditor(null);
}
- for (PropertySheetPage propertySheetPage : propertySheetPages) {
+ for (PropertySheetPage propertySheetPage : this.propertySheetPages) {
propertySheetPage.dispose();
}
- if (contentOutlinePage != null) {
- contentOutlinePage.dispose();
+ if (this.contentOutlinePage != null) {
+ this.contentOutlinePage.dispose();
}
super.dispose();
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/presentation/NattableaxisproviderEditor.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/presentation/NattableaxisproviderEditor.java
index d84865bff7e..4a34dd991d9 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/presentation/NattableaxisproviderEditor.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableaxisprovider/presentation/NattableaxisproviderEditor.java
@@ -15,7 +15,6 @@ package org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.p
import java.io.IOException;
import java.io.InputStream;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -34,24 +33,56 @@ import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.ResourcesPlugin;
-
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.ViewerPane;
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+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.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+import org.eclipse.emf.edit.ui.util.EditUIUtil;
+import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
-
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-
import org.eclipse.jface.util.LocalSelectionTransfer;
-
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -65,29 +96,29 @@ import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
-
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.provider.NattableaxisItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider.NattableaxisconfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider.NattableaxisproviderItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.NattableconfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider.NattablelabelproviderItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider.NattabletesterItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableItemProviderAdapterFactory;
import org.eclipse.swt.SWT;
-
import org.eclipse.swt.custom.CTabFolder;
-
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.Transfer;
-
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
-
import org.eclipse.swt.graphics.Point;
-
import org.eclipse.swt.layout.FillLayout;
-
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
-
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -95,92 +126,18 @@ import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
-
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.SaveAsDialog;
-
import org.eclipse.ui.ide.IGotoMarker;
-
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
-
import org.eclipse.ui.views.contentoutline.ContentOutline;
import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.PropertySheet;
import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.command.CommandStackListener;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.ui.MarkerHelper;
-import org.eclipse.emf.common.ui.ViewerPane;
-
-import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
-
-import org.eclipse.emf.common.ui.viewer.IViewerProvider;
-
-import org.eclipse.emf.common.util.BasicDiagnostic;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.common.util.URI;
-
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-import org.eclipse.emf.ecore.util.EContentAdapter;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-
-import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
-
-import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
-
-import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
-
-import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
-
-import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
-import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
-import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
-
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
-
-import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
-import org.eclipse.emf.edit.ui.util.EditUIUtil;
-
-import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider.NattableaxisproviderItemProviderAdapterFactory;
-
-import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider.NattableaxisconfigurationItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.NattableconfigurationItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider.NattablelabelproviderItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider.NattabletesterItemProviderAdapterFactory;
-import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableItemProviderAdapterFactory;
-
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
/**
* This is an example of a Nattableaxisprovider model editor.
@@ -349,14 +306,14 @@ public class NattableaxisproviderEditor
new IPartListener() {
public void partActivated(IWorkbenchPart p) {
if (p instanceof ContentOutline) {
- if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
+ if (((ContentOutline)p).getCurrentPage() == NattableaxisproviderEditor.this.contentOutlinePage) {
getActionBarContributor().setActiveEditor(NattableaxisproviderEditor.this);
- setCurrentViewer(contentOutlineViewer);
+ setCurrentViewer(NattableaxisproviderEditor.this.contentOutlineViewer);
}
}
else if (p instanceof PropertySheet) {
- if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
+ if (NattableaxisproviderEditor.this.propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
getActionBarContributor().setActiveEditor(NattableaxisproviderEditor.this);
handleActivate();
}
@@ -437,13 +394,13 @@ public class NattableaxisproviderEditor
Resource resource = (Resource)notification.getNotifier();
Diagnostic diagnostic = analyzeResourceProblems(resource, null);
if (diagnostic.getSeverity() != Diagnostic.OK) {
- resourceToDiagnosticMap.put(resource, diagnostic);
+ NattableaxisproviderEditor.this.resourceToDiagnosticMap.put(resource, diagnostic);
}
else {
- resourceToDiagnosticMap.remove(resource);
+ NattableaxisproviderEditor.this.resourceToDiagnosticMap.remove(resource);
}
- if (updateProblemIndication) {
+ if (NattableaxisproviderEditor.this.updateProblemIndication) {
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
@@ -468,8 +425,8 @@ public class NattableaxisproviderEditor
@Override
protected void unsetTarget(Resource target) {
basicUnsetTarget(target);
- resourceToDiagnosticMap.remove(target);
- if (updateProblemIndication) {
+ NattableaxisproviderEditor.this.resourceToDiagnosticMap.remove(target);
+ if (NattableaxisproviderEditor.this.updateProblemIndication) {
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
@@ -492,7 +449,7 @@ public class NattableaxisproviderEditor
IResourceDelta delta = event.getDelta();
try {
class ResourceDeltaVisitor implements IResourceDeltaVisitor {
- protected ResourceSet resourceSet = editingDomain.getResourceSet();
+ protected ResourceSet resourceSet = NattableaxisproviderEditor.this.editingDomain.getResourceSet();
protected Collection<Resource> changedResources = new ArrayList<Resource>();
protected Collection<Resource> removedResources = new ArrayList<Resource>();
@@ -500,13 +457,13 @@ public class NattableaxisproviderEditor
if (delta.getResource().getType() == IResource.FILE) {
if (delta.getKind() == IResourceDelta.REMOVED ||
delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
- Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
+ Resource resource = this.resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
if (resource != null) {
if (delta.getKind() == IResourceDelta.REMOVED) {
- removedResources.add(resource);
+ this.removedResources.add(resource);
}
- else if (!savedResources.remove(resource)) {
- changedResources.add(resource);
+ else if (!NattableaxisproviderEditor.this.savedResources.remove(resource)) {
+ this.changedResources.add(resource);
}
}
}
@@ -517,11 +474,11 @@ public class NattableaxisproviderEditor
}
public Collection<Resource> getChangedResources() {
- return changedResources;
+ return this.changedResources;
}
public Collection<Resource> getRemovedResources() {
- return removedResources;
+ return this.removedResources;
}
}
@@ -532,7 +489,7 @@ public class NattableaxisproviderEditor
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
- removedResources.addAll(visitor.getRemovedResources());
+ NattableaxisproviderEditor.this.removedResources.addAll(visitor.getRemovedResources());
if (!isDirty()) {
getSite().getPage().closeEditor(NattableaxisproviderEditor.this, false);
}
@@ -544,7 +501,7 @@ public class NattableaxisproviderEditor
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
- changedResources.addAll(visitor.getChangedResources());
+ NattableaxisproviderEditor.this.changedResources.addAll(visitor.getChangedResources());
if (getSite().getPage().getActiveEditor() == NattableaxisproviderEditor.this) {
handleActivate();
}
@@ -567,29 +524,29 @@ public class NattableaxisproviderEditor
protected void handleActivate() {
// Recompute the read only state.
//
- if (editingDomain.getResourceToReadOnlyMap() != null) {
- editingDomain.getResourceToReadOnlyMap().clear();
+ if (this.editingDomain.getResourceToReadOnlyMap() != null) {
+ this.editingDomain.getResourceToReadOnlyMap().clear();
// Refresh any actions that may become enabled or disabled.
//
setSelection(getSelection());
}
- if (!removedResources.isEmpty()) {
+ if (!this.removedResources.isEmpty()) {
if (handleDirtyConflict()) {
getSite().getPage().closeEditor(NattableaxisproviderEditor.this, false);
}
else {
- removedResources.clear();
- changedResources.clear();
- savedResources.clear();
+ this.removedResources.clear();
+ this.changedResources.clear();
+ this.savedResources.clear();
}
}
- else if (!changedResources.isEmpty()) {
- changedResources.removeAll(savedResources);
+ else if (!this.changedResources.isEmpty()) {
+ this.changedResources.removeAll(this.savedResources);
handleChangedResources();
- changedResources.clear();
- savedResources.clear();
+ this.changedResources.clear();
+ this.savedResources.clear();
}
}
@@ -600,32 +557,32 @@ public class NattableaxisproviderEditor
* @generated
*/
protected void handleChangedResources() {
- if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
+ if (!this.changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
if (isDirty()) {
- changedResources.addAll(editingDomain.getResourceSet().getResources());
+ this.changedResources.addAll(this.editingDomain.getResourceSet().getResources());
}
- editingDomain.getCommandStack().flush();
+ this.editingDomain.getCommandStack().flush();
- updateProblemIndication = false;
- for (Resource resource : changedResources) {
+ this.updateProblemIndication = false;
+ for (Resource resource : this.changedResources) {
if (resource.isLoaded()) {
resource.unload();
try {
resource.load(Collections.EMPTY_MAP);
}
catch (IOException exception) {
- if (!resourceToDiagnosticMap.containsKey(resource)) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ if (!this.resourceToDiagnosticMap.containsKey(resource)) {
+ this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
}
}
}
- if (AdapterFactoryEditingDomain.isStale(editorSelection)) {
+ if (AdapterFactoryEditingDomain.isStale(this.editorSelection)) {
setSelection(StructuredSelection.EMPTY);
}
- updateProblemIndication = true;
+ this.updateProblemIndication = true;
updateProblemIndication();
}
}
@@ -637,15 +594,15 @@ public class NattableaxisproviderEditor
* @generated
*/
protected void updateProblemIndication() {
- if (updateProblemIndication) {
+ if (this.updateProblemIndication) {
BasicDiagnostic diagnostic =
new BasicDiagnostic
(Diagnostic.OK,
"org.eclipse.papyrus.infra.nattable.model.editor", //$NON-NLS-1$
0,
null,
- new Object [] { editingDomain.getResourceSet() });
- for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) {
+ new Object [] { this.editingDomain.getResourceSet() });
+ for (Diagnostic childDiagnostic : this.resourceToDiagnosticMap.values()) {
if (childDiagnostic.getSeverity() != Diagnostic.OK) {
diagnostic.add(childDiagnostic);
}
@@ -661,7 +618,7 @@ public class NattableaxisproviderEditor
else if (diagnostic.getSeverity() != Diagnostic.OK) {
ProblemEditorPart problemEditorPart = new ProblemEditorPart();
problemEditorPart.setDiagnostic(diagnostic);
- problemEditorPart.setMarkerHelper(markerHelper);
+ problemEditorPart.setMarkerHelper(this.markerHelper);
try {
addPage(++lastEditorPage, problemEditorPart, getEditorInput());
setPageText(lastEditorPage, problemEditorPart.getPartName());
@@ -673,11 +630,11 @@ public class NattableaxisproviderEditor
}
}
- if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
- markerHelper.deleteMarkers(editingDomain.getResourceSet());
+ if (this.markerHelper.hasMarkers(this.editingDomain.getResourceSet())) {
+ this.markerHelper.deleteMarkers(this.editingDomain.getResourceSet());
if (diagnostic.getSeverity() != Diagnostic.OK) {
try {
- markerHelper.createMarkers(diagnostic);
+ this.markerHelper.createMarkers(diagnostic);
}
catch (CoreException exception) {
NattableEditorPlugin.INSTANCE.log(exception);
@@ -721,17 +678,18 @@ public class NattableaxisproviderEditor
protected void initializeEditingDomain() {
// Create an adapter factory that yields item providers.
//
- adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
-
- adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableconfigurationItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableaxisproviderItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattablelabelproviderItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableaxisconfigurationItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattabletesterItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+ this.adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ this.adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisproviderItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattablelabelproviderItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattabletesterItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
// Create the command stack that will notify this editor as commands are executed.
//
@@ -753,7 +711,7 @@ public class NattableaxisproviderEditor
if (mostRecentCommand != null) {
setSelectionToViewer(mostRecentCommand.getAffectedObjects());
}
- for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
+ for (Iterator<PropertySheetPage> i = NattableaxisproviderEditor.this.propertySheetPages.iterator(); i.hasNext(); ) {
PropertySheetPage propertySheetPage = i.next();
if (propertySheetPage.getControl().isDisposed()) {
i.remove();
@@ -769,7 +727,7 @@ public class NattableaxisproviderEditor
// Create the editing domain with a special command stack.
//
- editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ this.editingDomain = new AdapterFactoryEditingDomain(this.adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
/**
@@ -799,8 +757,8 @@ public class NattableaxisproviderEditor
public void run() {
// Try to select the items in the current content viewer of the editor.
//
- if (currentViewer != null) {
- currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
+ if (NattableaxisproviderEditor.this.currentViewer != null) {
+ NattableaxisproviderEditor.this.currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
}
}
};
@@ -817,7 +775,7 @@ public class NattableaxisproviderEditor
* @generated
*/
public EditingDomain getEditingDomain() {
- return editingDomain;
+ return this.editingDomain;
}
/**
@@ -885,13 +843,13 @@ public class NattableaxisproviderEditor
* @generated
*/
public void setCurrentViewerPane(ViewerPane viewerPane) {
- if (currentViewerPane != viewerPane) {
- if (currentViewerPane != null) {
- currentViewerPane.showFocus(false);
+ if (this.currentViewerPane != viewerPane) {
+ if (this.currentViewerPane != null) {
+ this.currentViewerPane.showFocus(false);
}
- currentViewerPane = viewerPane;
+ this.currentViewerPane = viewerPane;
}
- setCurrentViewer(currentViewerPane.getViewer());
+ setCurrentViewer(this.currentViewerPane.getViewer());
}
/**
@@ -904,11 +862,11 @@ public class NattableaxisproviderEditor
public void setCurrentViewer(Viewer viewer) {
// If it is changing...
//
- if (currentViewer != viewer) {
- if (selectionChangedListener == null) {
+ if (this.currentViewer != viewer) {
+ if (this.selectionChangedListener == null) {
// Create the listener on demand.
//
- selectionChangedListener =
+ this.selectionChangedListener =
new ISelectionChangedListener() {
// This just notifies those things that are affected by the section.
//
@@ -920,23 +878,23 @@ public class NattableaxisproviderEditor
// Stop listening to the old one.
//
- if (currentViewer != null) {
- currentViewer.removeSelectionChangedListener(selectionChangedListener);
+ if (this.currentViewer != null) {
+ this.currentViewer.removeSelectionChangedListener(this.selectionChangedListener);
}
// Start listening to the new one.
//
if (viewer != null) {
- viewer.addSelectionChangedListener(selectionChangedListener);
+ viewer.addSelectionChangedListener(this.selectionChangedListener);
}
// Remember it.
//
- currentViewer = viewer;
+ this.currentViewer = viewer;
// Set the editors selection based on the current viewer's selection.
//
- setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());
+ setSelection(this.currentViewer == null ? StructuredSelection.EMPTY : this.currentViewer.getSelection());
}
}
@@ -947,7 +905,7 @@ public class NattableaxisproviderEditor
* @generated
*/
public Viewer getViewer() {
- return currentViewer;
+ return this.currentViewer;
}
/**
@@ -968,7 +926,7 @@ public class NattableaxisproviderEditor
int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
- viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(this.editingDomain, viewer));
}
/**
@@ -984,18 +942,18 @@ public class NattableaxisproviderEditor
try {
// Load the resource through the editing domain.
//
- resource = editingDomain.getResourceSet().getResource(resourceURI, true);
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, true);
}
catch (Exception e) {
exception = e;
- resource = editingDomain.getResourceSet().getResource(resourceURI, false);
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, false);
}
Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
if (diagnostic.getSeverity() != Diagnostic.OK) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
- editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);
+ this.editingDomain.getResourceSet().eAdapters().add(this.problemIndicationAdapter);
}
/**
@@ -1065,17 +1023,17 @@ public class NattableaxisproviderEditor
};
viewerPane.createControl(getContainer());
- selectionViewer = (TreeViewer)viewerPane.getViewer();
- selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ this.selectionViewer = (TreeViewer)viewerPane.getViewer();
+ this.selectionViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
- selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- selectionViewer.setInput(editingDomain.getResourceSet());
- selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
- viewerPane.setTitle(editingDomain.getResourceSet());
+ this.selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
+ this.selectionViewer.setInput(this.editingDomain.getResourceSet());
+ this.selectionViewer.setSelection(new StructuredSelection(this.editingDomain.getResourceSet().getResources().get(0)), true);
+ viewerPane.setTitle(this.editingDomain.getResourceSet());
- new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
+ new AdapterFactoryTreeEditor(this.selectionViewer.getTree(), this.adapterFactory);
- createContextMenuFor(selectionViewer);
+ createContextMenuFor(this.selectionViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
}
@@ -1099,12 +1057,12 @@ public class NattableaxisproviderEditor
};
viewerPane.createControl(getContainer());
- parentViewer = (TreeViewer)viewerPane.getViewer();
- parentViewer.setAutoExpandLevel(30);
- parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
- parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.parentViewer = (TreeViewer)viewerPane.getViewer();
+ this.parentViewer.setAutoExpandLevel(30);
+ this.parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(this.adapterFactory));
+ this.parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(parentViewer);
+ createContextMenuFor(this.parentViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_ParentPage_label")); //$NON-NLS-1$
}
@@ -1125,11 +1083,11 @@ public class NattableaxisproviderEditor
}
};
viewerPane.createControl(getContainer());
- listViewer = (ListViewer)viewerPane.getViewer();
- listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.listViewer = (ListViewer)viewerPane.getViewer();
+ this.listViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.listViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(listViewer);
+ createContextMenuFor(this.listViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_ListPage_label")); //$NON-NLS-1$
}
@@ -1150,13 +1108,13 @@ public class NattableaxisproviderEditor
}
};
viewerPane.createControl(getContainer());
- treeViewer = (TreeViewer)viewerPane.getViewer();
- treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.treeViewer = (TreeViewer)viewerPane.getViewer();
+ this.treeViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
+ new AdapterFactoryTreeEditor(this.treeViewer.getTree(), this.adapterFactory);
- createContextMenuFor(treeViewer);
+ createContextMenuFor(this.treeViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TreePage_label")); //$NON-NLS-1$
}
@@ -1177,9 +1135,9 @@ public class NattableaxisproviderEditor
}
};
viewerPane.createControl(getContainer());
- tableViewer = (TableViewer)viewerPane.getViewer();
+ this.tableViewer = (TableViewer)viewerPane.getViewer();
- Table table = tableViewer.getTable();
+ Table table = this.tableViewer.getTable();
TableLayout layout = new TableLayout();
table.setLayout(layout);
table.setHeaderVisible(true);
@@ -1195,11 +1153,11 @@ public class NattableaxisproviderEditor
selfColumn.setText(getString("_UI_SelfColumn_label")); //$NON-NLS-1$
selfColumn.setResizable(true);
- tableViewer.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
- tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.tableViewer.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
+ this.tableViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(tableViewer);
+ createContextMenuFor(this.tableViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TablePage_label")); //$NON-NLS-1$
}
@@ -1221,9 +1179,9 @@ public class NattableaxisproviderEditor
};
viewerPane.createControl(getContainer());
- treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
+ this.treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
- Tree tree = treeViewerWithColumns.getTree();
+ Tree tree = this.treeViewerWithColumns.getTree();
tree.setLayoutData(new FillLayout());
tree.setHeaderVisible(true);
tree.setLinesVisible(true);
@@ -1238,11 +1196,11 @@ public class NattableaxisproviderEditor
selfColumn.setResizable(true);
selfColumn.setWidth(200);
- treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
- treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
+ this.treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(treeViewerWithColumns);
+ createContextMenuFor(this.treeViewerWithColumns);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); //$NON-NLS-1$
}
@@ -1263,10 +1221,10 @@ public class NattableaxisproviderEditor
boolean guard = false;
@Override
public void controlResized(ControlEvent event) {
- if (!guard) {
- guard = true;
+ if (!this.guard) {
+ this.guard = true;
hideTabs();
- guard = false;
+ this.guard = false;
}
}
});
@@ -1325,8 +1283,8 @@ public class NattableaxisproviderEditor
protected void pageChange(int pageIndex) {
super.pageChange(pageIndex);
- if (contentOutlinePage != null) {
- handleContentOutlineSelection(contentOutlinePage.getSelection());
+ if (this.contentOutlinePage != null) {
+ handleContentOutlineSelection(this.contentOutlinePage.getSelection());
}
}
@@ -1360,37 +1318,37 @@ public class NattableaxisproviderEditor
* @generated
*/
public IContentOutlinePage getContentOutlinePage() {
- if (contentOutlinePage == null) {
+ if (this.contentOutlinePage == null) {
// The content outline is just a tree.
//
class MyContentOutlinePage extends ContentOutlinePage {
@Override
public void createControl(Composite parent) {
super.createControl(parent);
- contentOutlineViewer = getTreeViewer();
- contentOutlineViewer.addSelectionChangedListener(this);
+ NattableaxisproviderEditor.this.contentOutlineViewer = getTreeViewer();
+ NattableaxisproviderEditor.this.contentOutlineViewer.addSelectionChangedListener(this);
// Set up the tree viewer.
//
- contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- contentOutlineViewer.setInput(editingDomain.getResourceSet());
+ NattableaxisproviderEditor.this.contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(NattableaxisproviderEditor.this.adapterFactory));
+ NattableaxisproviderEditor.this.contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(NattableaxisproviderEditor.this.adapterFactory));
+ NattableaxisproviderEditor.this.contentOutlineViewer.setInput(NattableaxisproviderEditor.this.editingDomain.getResourceSet());
// Make sure our popups work.
//
- createContextMenuFor(contentOutlineViewer);
+ createContextMenuFor(NattableaxisproviderEditor.this.contentOutlineViewer);
- if (!editingDomain.getResourceSet().getResources().isEmpty()) {
+ if (!NattableaxisproviderEditor.this.editingDomain.getResourceSet().getResources().isEmpty()) {
// Select the root object in the view.
//
- contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ NattableaxisproviderEditor.this.contentOutlineViewer.setSelection(new StructuredSelection(NattableaxisproviderEditor.this.editingDomain.getResourceSet().getResources().get(0)), true);
}
}
@Override
public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
super.makeContributions(menuManager, toolBarManager, statusLineManager);
- contentOutlineStatusLineManager = statusLineManager;
+ NattableaxisproviderEditor.this.contentOutlineStatusLineManager = statusLineManager;
}
@Override
@@ -1400,11 +1358,11 @@ public class NattableaxisproviderEditor
}
}
- contentOutlinePage = new MyContentOutlinePage();
+ this.contentOutlinePage = new MyContentOutlinePage();
// Listen to selection so that we can handle it is a special way.
//
- contentOutlinePage.addSelectionChangedListener
+ this.contentOutlinePage.addSelectionChangedListener
(new ISelectionChangedListener() {
// This ensures that we handle selections correctly.
//
@@ -1414,7 +1372,7 @@ public class NattableaxisproviderEditor
});
}
- return contentOutlinePage;
+ return this.contentOutlinePage;
}
/**
@@ -1425,7 +1383,7 @@ public class NattableaxisproviderEditor
*/
public IPropertySheetPage getPropertySheetPage() {
PropertySheetPage propertySheetPage =
- new ExtendedPropertySheetPage(editingDomain) {
+ new ExtendedPropertySheetPage(this.editingDomain) {
@Override
public void setSelectionToViewer(List<?> selection) {
NattableaxisproviderEditor.this.setSelectionToViewer(selection);
@@ -1438,8 +1396,8 @@ public class NattableaxisproviderEditor
getActionBarContributor().shareGlobalActions(this, actionBars);
}
};
- propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
- propertySheetPages.add(propertySheetPage);
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.propertySheetPages.add(propertySheetPage);
return propertySheetPage;
}
@@ -1451,7 +1409,7 @@ public class NattableaxisproviderEditor
* @generated
*/
public void handleContentOutlineSelection(ISelection selection) {
- if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ if (this.currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator();
if (selectedElements.hasNext()) {
// Get the first selected element.
@@ -1460,7 +1418,7 @@ public class NattableaxisproviderEditor
// If it's the selection viewer, then we want it to select the same selection as this selection.
//
- if (currentViewerPane.getViewer() == selectionViewer) {
+ if (this.currentViewerPane.getViewer() == this.selectionViewer) {
ArrayList<Object> selectionList = new ArrayList<Object>();
selectionList.add(selectedElement);
while (selectedElements.hasNext()) {
@@ -1469,14 +1427,14 @@ public class NattableaxisproviderEditor
// Set the selection to the widget.
//
- selectionViewer.setSelection(new StructuredSelection(selectionList));
+ this.selectionViewer.setSelection(new StructuredSelection(selectionList));
}
else {
// Set the input to the widget.
//
- if (currentViewerPane.getViewer().getInput() != selectedElement) {
- currentViewerPane.getViewer().setInput(selectedElement);
- currentViewerPane.setTitle(selectedElement);
+ if (this.currentViewerPane.getViewer().getInput() != selectedElement) {
+ this.currentViewerPane.getViewer().setInput(selectedElement);
+ this.currentViewerPane.setTitle(selectedElement);
}
}
}
@@ -1491,14 +1449,15 @@ public class NattableaxisproviderEditor
*/
@Override
public boolean isDirty() {
- return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
+ return ((BasicCommandStack)this.editingDomain.getCommandStack()).isSaveNeeded();
}
/**
* This is for implementing {@link IEditorPart} and simply saves the model file.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ *
+ * @generated NOT
*/
@Override
public void doSave(IProgressMonitor progressMonitor) {
@@ -1507,7 +1466,7 @@ public class NattableaxisproviderEditor
final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);
-
+ saveOptions.put(XMIResource.OPTION_SAVE_TYPE_INFORMATION, true);
// Do the work within an operation because this is a long running activity that modifies the workbench.
//
WorkspaceModifyOperation operation =
@@ -1519,17 +1478,17 @@ public class NattableaxisproviderEditor
// Save the resources to the file system.
//
boolean first = true;
- for (Resource resource : editingDomain.getResourceSet().getResources()) {
- if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
+ for (Resource resource : NattableaxisproviderEditor.this.editingDomain.getResourceSet().getResources()) {
+ if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !NattableaxisproviderEditor.this.editingDomain.isReadOnly(resource)) {
try {
long timeStamp = resource.getTimeStamp();
resource.save(saveOptions);
if (resource.getTimeStamp() != timeStamp) {
- savedResources.add(resource);
+ NattableaxisproviderEditor.this.savedResources.add(resource);
}
}
catch (Exception exception) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ NattableaxisproviderEditor.this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
first = false;
}
@@ -1537,7 +1496,7 @@ public class NattableaxisproviderEditor
}
};
- updateProblemIndication = false;
+ this.updateProblemIndication = false;
try {
// This runs the options, and shows progress.
//
@@ -1545,7 +1504,7 @@ public class NattableaxisproviderEditor
// Refresh the necessary state.
//
- ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
+ ((BasicCommandStack)this.editingDomain.getCommandStack()).saveIsDone();
firePropertyChange(IEditorPart.PROP_DIRTY);
}
catch (Exception exception) {
@@ -1553,7 +1512,7 @@ public class NattableaxisproviderEditor
//
NattableEditorPlugin.INSTANCE.log(exception);
}
- updateProblemIndication = true;
+ this.updateProblemIndication = true;
updateProblemIndication();
}
@@ -1567,7 +1526,7 @@ public class NattableaxisproviderEditor
protected boolean isPersisted(Resource resource) {
boolean result = false;
try {
- InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ InputStream stream = this.editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
if (stream != null) {
result = true;
stream.close();
@@ -1615,7 +1574,7 @@ public class NattableaxisproviderEditor
* @generated
*/
protected void doSaveAs(URI uri, IEditorInput editorInput) {
- (editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ (this.editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
IProgressMonitor progressMonitor =
@@ -1631,7 +1590,7 @@ public class NattableaxisproviderEditor
* @generated
*/
public void gotoMarker(IMarker marker) {
- List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker);
+ List<?> targetObjects = this.markerHelper.getTargetObjects(this.editingDomain, marker);
if (!targetObjects.isEmpty()) {
setSelectionToViewer(targetObjects);
}
@@ -1649,8 +1608,8 @@ public class NattableaxisproviderEditor
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
site.setSelectionProvider(this);
- site.getPage().addPartListener(partListener);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
+ site.getPage().addPartListener(this.partListener);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this.resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
}
/**
@@ -1660,8 +1619,8 @@ public class NattableaxisproviderEditor
*/
@Override
public void setFocus() {
- if (currentViewerPane != null) {
- currentViewerPane.setFocus();
+ if (this.currentViewerPane != null) {
+ this.currentViewerPane.setFocus();
}
else {
getControl(getActivePage()).setFocus();
@@ -1675,7 +1634,7 @@ public class NattableaxisproviderEditor
* @generated
*/
public void addSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.add(listener);
+ this.selectionChangedListeners.add(listener);
}
/**
@@ -1685,7 +1644,7 @@ public class NattableaxisproviderEditor
* @generated
*/
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.remove(listener);
+ this.selectionChangedListeners.remove(listener);
}
/**
@@ -1695,7 +1654,7 @@ public class NattableaxisproviderEditor
* @generated
*/
public ISelection getSelection() {
- return editorSelection;
+ return this.editorSelection;
}
/**
@@ -1706,9 +1665,9 @@ public class NattableaxisproviderEditor
* @generated
*/
public void setSelection(ISelection selection) {
- editorSelection = selection;
+ this.editorSelection = selection;
- for (ISelectionChangedListener listener : selectionChangedListeners) {
+ for (ISelectionChangedListener listener : this.selectionChangedListeners) {
listener.selectionChanged(new SelectionChangedEvent(this, selection));
}
setStatusLineManager(selection);
@@ -1720,8 +1679,8 @@ public class NattableaxisproviderEditor
* @generated
*/
public void setStatusLineManager(ISelection selection) {
- IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?
- contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+ IStatusLineManager statusLineManager = this.currentViewer != null && this.currentViewer == this.contentOutlineViewer ?
+ this.contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
if (statusLineManager != null) {
if (selection instanceof IStructuredSelection) {
@@ -1732,7 +1691,7 @@ public class NattableaxisproviderEditor
break;
}
case 1: {
- String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
+ String text = new AdapterFactoryItemDelegator(this.adapterFactory).getText(collection.iterator().next());
statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); //$NON-NLS-1$
break;
}
@@ -1802,7 +1761,7 @@ public class NattableaxisproviderEditor
* @generated
*/
public AdapterFactory getAdapterFactory() {
- return adapterFactory;
+ return this.adapterFactory;
}
/**
@@ -1812,24 +1771,24 @@ public class NattableaxisproviderEditor
*/
@Override
public void dispose() {
- updateProblemIndication = false;
+ this.updateProblemIndication = false;
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this.resourceChangeListener);
- getSite().getPage().removePartListener(partListener);
+ getSite().getPage().removePartListener(this.partListener);
- adapterFactory.dispose();
+ this.adapterFactory.dispose();
if (getActionBarContributor().getActiveEditor() == this) {
getActionBarContributor().setActiveEditor(null);
}
- for (PropertySheetPage propertySheetPage : propertySheetPages) {
+ for (PropertySheetPage propertySheetPage : this.propertySheetPages) {
propertySheetPage.dispose();
}
- if (contentOutlinePage != null) {
- contentOutlinePage.dispose();
+ if (this.contentOutlinePage != null) {
+ this.contentOutlinePage.dispose();
}
super.dispose();
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/presentation/NattableconfigurationEditor.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/presentation/NattableconfigurationEditor.java
index c870f93adbf..24b18eab902 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/presentation/NattableconfigurationEditor.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattableconfiguration/presentation/NattableconfigurationEditor.java
@@ -15,7 +15,6 @@ package org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.
import java.io.IOException;
import java.io.InputStream;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -34,24 +33,56 @@ import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.ResourcesPlugin;
-
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.ViewerPane;
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+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.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+import org.eclipse.emf.edit.ui.util.EditUIUtil;
+import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
-
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-
import org.eclipse.jface.util.LocalSelectionTransfer;
-
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -65,29 +96,29 @@ import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
-
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.provider.NattableaxisItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider.NattableaxisconfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider.NattableaxisproviderItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.NattableconfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider.NattablelabelproviderItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider.NattabletesterItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableItemProviderAdapterFactory;
import org.eclipse.swt.SWT;
-
import org.eclipse.swt.custom.CTabFolder;
-
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.Transfer;
-
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
-
import org.eclipse.swt.graphics.Point;
-
import org.eclipse.swt.layout.FillLayout;
-
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
-
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -95,92 +126,18 @@ import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
-
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.SaveAsDialog;
-
import org.eclipse.ui.ide.IGotoMarker;
-
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
-
import org.eclipse.ui.views.contentoutline.ContentOutline;
import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.PropertySheet;
import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.command.CommandStackListener;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.ui.MarkerHelper;
-import org.eclipse.emf.common.ui.ViewerPane;
-
-import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
-
-import org.eclipse.emf.common.ui.viewer.IViewerProvider;
-
-import org.eclipse.emf.common.util.BasicDiagnostic;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.common.util.URI;
-
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-import org.eclipse.emf.ecore.util.EContentAdapter;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-
-import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
-
-import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
-
-import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
-
-import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
-
-import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
-import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
-import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
-
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
-
-import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
-import org.eclipse.emf.edit.ui.util.EditUIUtil;
-
-import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.NattableconfigurationItemProviderAdapterFactory;
-
-import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider.NattableaxisconfigurationItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider.NattableaxisproviderItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider.NattablelabelproviderItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider.NattabletesterItemProviderAdapterFactory;
-import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableItemProviderAdapterFactory;
-
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
/**
* This is an example of a Nattableconfiguration model editor.
@@ -349,14 +306,14 @@ public class NattableconfigurationEditor
new IPartListener() {
public void partActivated(IWorkbenchPart p) {
if (p instanceof ContentOutline) {
- if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
+ if (((ContentOutline)p).getCurrentPage() == NattableconfigurationEditor.this.contentOutlinePage) {
getActionBarContributor().setActiveEditor(NattableconfigurationEditor.this);
- setCurrentViewer(contentOutlineViewer);
+ setCurrentViewer(NattableconfigurationEditor.this.contentOutlineViewer);
}
}
else if (p instanceof PropertySheet) {
- if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
+ if (NattableconfigurationEditor.this.propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
getActionBarContributor().setActiveEditor(NattableconfigurationEditor.this);
handleActivate();
}
@@ -437,13 +394,13 @@ public class NattableconfigurationEditor
Resource resource = (Resource)notification.getNotifier();
Diagnostic diagnostic = analyzeResourceProblems(resource, null);
if (diagnostic.getSeverity() != Diagnostic.OK) {
- resourceToDiagnosticMap.put(resource, diagnostic);
+ NattableconfigurationEditor.this.resourceToDiagnosticMap.put(resource, diagnostic);
}
else {
- resourceToDiagnosticMap.remove(resource);
+ NattableconfigurationEditor.this.resourceToDiagnosticMap.remove(resource);
}
- if (updateProblemIndication) {
+ if (NattableconfigurationEditor.this.updateProblemIndication) {
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
@@ -468,8 +425,8 @@ public class NattableconfigurationEditor
@Override
protected void unsetTarget(Resource target) {
basicUnsetTarget(target);
- resourceToDiagnosticMap.remove(target);
- if (updateProblemIndication) {
+ NattableconfigurationEditor.this.resourceToDiagnosticMap.remove(target);
+ if (NattableconfigurationEditor.this.updateProblemIndication) {
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
@@ -492,7 +449,7 @@ public class NattableconfigurationEditor
IResourceDelta delta = event.getDelta();
try {
class ResourceDeltaVisitor implements IResourceDeltaVisitor {
- protected ResourceSet resourceSet = editingDomain.getResourceSet();
+ protected ResourceSet resourceSet = NattableconfigurationEditor.this.editingDomain.getResourceSet();
protected Collection<Resource> changedResources = new ArrayList<Resource>();
protected Collection<Resource> removedResources = new ArrayList<Resource>();
@@ -500,13 +457,13 @@ public class NattableconfigurationEditor
if (delta.getResource().getType() == IResource.FILE) {
if (delta.getKind() == IResourceDelta.REMOVED ||
delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
- Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
+ Resource resource = this.resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
if (resource != null) {
if (delta.getKind() == IResourceDelta.REMOVED) {
- removedResources.add(resource);
+ this.removedResources.add(resource);
}
- else if (!savedResources.remove(resource)) {
- changedResources.add(resource);
+ else if (!NattableconfigurationEditor.this.savedResources.remove(resource)) {
+ this.changedResources.add(resource);
}
}
}
@@ -517,11 +474,11 @@ public class NattableconfigurationEditor
}
public Collection<Resource> getChangedResources() {
- return changedResources;
+ return this.changedResources;
}
public Collection<Resource> getRemovedResources() {
- return removedResources;
+ return this.removedResources;
}
}
@@ -532,7 +489,7 @@ public class NattableconfigurationEditor
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
- removedResources.addAll(visitor.getRemovedResources());
+ NattableconfigurationEditor.this.removedResources.addAll(visitor.getRemovedResources());
if (!isDirty()) {
getSite().getPage().closeEditor(NattableconfigurationEditor.this, false);
}
@@ -544,7 +501,7 @@ public class NattableconfigurationEditor
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
- changedResources.addAll(visitor.getChangedResources());
+ NattableconfigurationEditor.this.changedResources.addAll(visitor.getChangedResources());
if (getSite().getPage().getActiveEditor() == NattableconfigurationEditor.this) {
handleActivate();
}
@@ -567,29 +524,29 @@ public class NattableconfigurationEditor
protected void handleActivate() {
// Recompute the read only state.
//
- if (editingDomain.getResourceToReadOnlyMap() != null) {
- editingDomain.getResourceToReadOnlyMap().clear();
+ if (this.editingDomain.getResourceToReadOnlyMap() != null) {
+ this.editingDomain.getResourceToReadOnlyMap().clear();
// Refresh any actions that may become enabled or disabled.
//
setSelection(getSelection());
}
- if (!removedResources.isEmpty()) {
+ if (!this.removedResources.isEmpty()) {
if (handleDirtyConflict()) {
getSite().getPage().closeEditor(NattableconfigurationEditor.this, false);
}
else {
- removedResources.clear();
- changedResources.clear();
- savedResources.clear();
+ this.removedResources.clear();
+ this.changedResources.clear();
+ this.savedResources.clear();
}
}
- else if (!changedResources.isEmpty()) {
- changedResources.removeAll(savedResources);
+ else if (!this.changedResources.isEmpty()) {
+ this.changedResources.removeAll(this.savedResources);
handleChangedResources();
- changedResources.clear();
- savedResources.clear();
+ this.changedResources.clear();
+ this.savedResources.clear();
}
}
@@ -600,32 +557,32 @@ public class NattableconfigurationEditor
* @generated
*/
protected void handleChangedResources() {
- if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
+ if (!this.changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
if (isDirty()) {
- changedResources.addAll(editingDomain.getResourceSet().getResources());
+ this.changedResources.addAll(this.editingDomain.getResourceSet().getResources());
}
- editingDomain.getCommandStack().flush();
+ this.editingDomain.getCommandStack().flush();
- updateProblemIndication = false;
- for (Resource resource : changedResources) {
+ this.updateProblemIndication = false;
+ for (Resource resource : this.changedResources) {
if (resource.isLoaded()) {
resource.unload();
try {
resource.load(Collections.EMPTY_MAP);
}
catch (IOException exception) {
- if (!resourceToDiagnosticMap.containsKey(resource)) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ if (!this.resourceToDiagnosticMap.containsKey(resource)) {
+ this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
}
}
}
- if (AdapterFactoryEditingDomain.isStale(editorSelection)) {
+ if (AdapterFactoryEditingDomain.isStale(this.editorSelection)) {
setSelection(StructuredSelection.EMPTY);
}
- updateProblemIndication = true;
+ this.updateProblemIndication = true;
updateProblemIndication();
}
}
@@ -637,15 +594,15 @@ public class NattableconfigurationEditor
* @generated
*/
protected void updateProblemIndication() {
- if (updateProblemIndication) {
+ if (this.updateProblemIndication) {
BasicDiagnostic diagnostic =
new BasicDiagnostic
(Diagnostic.OK,
"org.eclipse.papyrus.infra.nattable.model.editor", //$NON-NLS-1$
0,
null,
- new Object [] { editingDomain.getResourceSet() });
- for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) {
+ new Object [] { this.editingDomain.getResourceSet() });
+ for (Diagnostic childDiagnostic : this.resourceToDiagnosticMap.values()) {
if (childDiagnostic.getSeverity() != Diagnostic.OK) {
diagnostic.add(childDiagnostic);
}
@@ -661,7 +618,7 @@ public class NattableconfigurationEditor
else if (diagnostic.getSeverity() != Diagnostic.OK) {
ProblemEditorPart problemEditorPart = new ProblemEditorPart();
problemEditorPart.setDiagnostic(diagnostic);
- problemEditorPart.setMarkerHelper(markerHelper);
+ problemEditorPart.setMarkerHelper(this.markerHelper);
try {
addPage(++lastEditorPage, problemEditorPart, getEditorInput());
setPageText(lastEditorPage, problemEditorPart.getPartName());
@@ -673,11 +630,11 @@ public class NattableconfigurationEditor
}
}
- if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
- markerHelper.deleteMarkers(editingDomain.getResourceSet());
+ if (this.markerHelper.hasMarkers(this.editingDomain.getResourceSet())) {
+ this.markerHelper.deleteMarkers(this.editingDomain.getResourceSet());
if (diagnostic.getSeverity() != Diagnostic.OK) {
try {
- markerHelper.createMarkers(diagnostic);
+ this.markerHelper.createMarkers(diagnostic);
}
catch (CoreException exception) {
NattableEditorPlugin.INSTANCE.log(exception);
@@ -721,17 +678,18 @@ public class NattableconfigurationEditor
protected void initializeEditingDomain() {
// Create an adapter factory that yields item providers.
//
- adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
-
- adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableconfigurationItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableaxisproviderItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattablelabelproviderItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableaxisconfigurationItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattabletesterItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+ this.adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ this.adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisproviderItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattablelabelproviderItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattabletesterItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
// Create the command stack that will notify this editor as commands are executed.
//
@@ -753,7 +711,7 @@ public class NattableconfigurationEditor
if (mostRecentCommand != null) {
setSelectionToViewer(mostRecentCommand.getAffectedObjects());
}
- for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
+ for (Iterator<PropertySheetPage> i = NattableconfigurationEditor.this.propertySheetPages.iterator(); i.hasNext(); ) {
PropertySheetPage propertySheetPage = i.next();
if (propertySheetPage.getControl().isDisposed()) {
i.remove();
@@ -769,7 +727,7 @@ public class NattableconfigurationEditor
// Create the editing domain with a special command stack.
//
- editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ this.editingDomain = new AdapterFactoryEditingDomain(this.adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
/**
@@ -799,8 +757,8 @@ public class NattableconfigurationEditor
public void run() {
// Try to select the items in the current content viewer of the editor.
//
- if (currentViewer != null) {
- currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
+ if (NattableconfigurationEditor.this.currentViewer != null) {
+ NattableconfigurationEditor.this.currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
}
}
};
@@ -817,7 +775,7 @@ public class NattableconfigurationEditor
* @generated
*/
public EditingDomain getEditingDomain() {
- return editingDomain;
+ return this.editingDomain;
}
/**
@@ -885,13 +843,13 @@ public class NattableconfigurationEditor
* @generated
*/
public void setCurrentViewerPane(ViewerPane viewerPane) {
- if (currentViewerPane != viewerPane) {
- if (currentViewerPane != null) {
- currentViewerPane.showFocus(false);
+ if (this.currentViewerPane != viewerPane) {
+ if (this.currentViewerPane != null) {
+ this.currentViewerPane.showFocus(false);
}
- currentViewerPane = viewerPane;
+ this.currentViewerPane = viewerPane;
}
- setCurrentViewer(currentViewerPane.getViewer());
+ setCurrentViewer(this.currentViewerPane.getViewer());
}
/**
@@ -904,11 +862,11 @@ public class NattableconfigurationEditor
public void setCurrentViewer(Viewer viewer) {
// If it is changing...
//
- if (currentViewer != viewer) {
- if (selectionChangedListener == null) {
+ if (this.currentViewer != viewer) {
+ if (this.selectionChangedListener == null) {
// Create the listener on demand.
//
- selectionChangedListener =
+ this.selectionChangedListener =
new ISelectionChangedListener() {
// This just notifies those things that are affected by the section.
//
@@ -920,23 +878,23 @@ public class NattableconfigurationEditor
// Stop listening to the old one.
//
- if (currentViewer != null) {
- currentViewer.removeSelectionChangedListener(selectionChangedListener);
+ if (this.currentViewer != null) {
+ this.currentViewer.removeSelectionChangedListener(this.selectionChangedListener);
}
// Start listening to the new one.
//
if (viewer != null) {
- viewer.addSelectionChangedListener(selectionChangedListener);
+ viewer.addSelectionChangedListener(this.selectionChangedListener);
}
// Remember it.
//
- currentViewer = viewer;
+ this.currentViewer = viewer;
// Set the editors selection based on the current viewer's selection.
//
- setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());
+ setSelection(this.currentViewer == null ? StructuredSelection.EMPTY : this.currentViewer.getSelection());
}
}
@@ -947,7 +905,7 @@ public class NattableconfigurationEditor
* @generated
*/
public Viewer getViewer() {
- return currentViewer;
+ return this.currentViewer;
}
/**
@@ -968,7 +926,7 @@ public class NattableconfigurationEditor
int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
- viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(this.editingDomain, viewer));
}
/**
@@ -984,18 +942,18 @@ public class NattableconfigurationEditor
try {
// Load the resource through the editing domain.
//
- resource = editingDomain.getResourceSet().getResource(resourceURI, true);
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, true);
}
catch (Exception e) {
exception = e;
- resource = editingDomain.getResourceSet().getResource(resourceURI, false);
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, false);
}
Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
if (diagnostic.getSeverity() != Diagnostic.OK) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
- editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);
+ this.editingDomain.getResourceSet().eAdapters().add(this.problemIndicationAdapter);
}
/**
@@ -1065,17 +1023,17 @@ public class NattableconfigurationEditor
};
viewerPane.createControl(getContainer());
- selectionViewer = (TreeViewer)viewerPane.getViewer();
- selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ this.selectionViewer = (TreeViewer)viewerPane.getViewer();
+ this.selectionViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
- selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- selectionViewer.setInput(editingDomain.getResourceSet());
- selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
- viewerPane.setTitle(editingDomain.getResourceSet());
+ this.selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
+ this.selectionViewer.setInput(this.editingDomain.getResourceSet());
+ this.selectionViewer.setSelection(new StructuredSelection(this.editingDomain.getResourceSet().getResources().get(0)), true);
+ viewerPane.setTitle(this.editingDomain.getResourceSet());
- new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
+ new AdapterFactoryTreeEditor(this.selectionViewer.getTree(), this.adapterFactory);
- createContextMenuFor(selectionViewer);
+ createContextMenuFor(this.selectionViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
}
@@ -1099,12 +1057,12 @@ public class NattableconfigurationEditor
};
viewerPane.createControl(getContainer());
- parentViewer = (TreeViewer)viewerPane.getViewer();
- parentViewer.setAutoExpandLevel(30);
- parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
- parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.parentViewer = (TreeViewer)viewerPane.getViewer();
+ this.parentViewer.setAutoExpandLevel(30);
+ this.parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(this.adapterFactory));
+ this.parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(parentViewer);
+ createContextMenuFor(this.parentViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_ParentPage_label")); //$NON-NLS-1$
}
@@ -1125,11 +1083,11 @@ public class NattableconfigurationEditor
}
};
viewerPane.createControl(getContainer());
- listViewer = (ListViewer)viewerPane.getViewer();
- listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.listViewer = (ListViewer)viewerPane.getViewer();
+ this.listViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.listViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(listViewer);
+ createContextMenuFor(this.listViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_ListPage_label")); //$NON-NLS-1$
}
@@ -1150,13 +1108,13 @@ public class NattableconfigurationEditor
}
};
viewerPane.createControl(getContainer());
- treeViewer = (TreeViewer)viewerPane.getViewer();
- treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.treeViewer = (TreeViewer)viewerPane.getViewer();
+ this.treeViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
+ new AdapterFactoryTreeEditor(this.treeViewer.getTree(), this.adapterFactory);
- createContextMenuFor(treeViewer);
+ createContextMenuFor(this.treeViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TreePage_label")); //$NON-NLS-1$
}
@@ -1177,9 +1135,9 @@ public class NattableconfigurationEditor
}
};
viewerPane.createControl(getContainer());
- tableViewer = (TableViewer)viewerPane.getViewer();
+ this.tableViewer = (TableViewer)viewerPane.getViewer();
- Table table = tableViewer.getTable();
+ Table table = this.tableViewer.getTable();
TableLayout layout = new TableLayout();
table.setLayout(layout);
table.setHeaderVisible(true);
@@ -1195,11 +1153,11 @@ public class NattableconfigurationEditor
selfColumn.setText(getString("_UI_SelfColumn_label")); //$NON-NLS-1$
selfColumn.setResizable(true);
- tableViewer.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
- tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.tableViewer.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
+ this.tableViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(tableViewer);
+ createContextMenuFor(this.tableViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TablePage_label")); //$NON-NLS-1$
}
@@ -1221,9 +1179,9 @@ public class NattableconfigurationEditor
};
viewerPane.createControl(getContainer());
- treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
+ this.treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
- Tree tree = treeViewerWithColumns.getTree();
+ Tree tree = this.treeViewerWithColumns.getTree();
tree.setLayoutData(new FillLayout());
tree.setHeaderVisible(true);
tree.setLinesVisible(true);
@@ -1238,11 +1196,11 @@ public class NattableconfigurationEditor
selfColumn.setResizable(true);
selfColumn.setWidth(200);
- treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
- treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
+ this.treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(treeViewerWithColumns);
+ createContextMenuFor(this.treeViewerWithColumns);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); //$NON-NLS-1$
}
@@ -1263,10 +1221,10 @@ public class NattableconfigurationEditor
boolean guard = false;
@Override
public void controlResized(ControlEvent event) {
- if (!guard) {
- guard = true;
+ if (!this.guard) {
+ this.guard = true;
hideTabs();
- guard = false;
+ this.guard = false;
}
}
});
@@ -1325,8 +1283,8 @@ public class NattableconfigurationEditor
protected void pageChange(int pageIndex) {
super.pageChange(pageIndex);
- if (contentOutlinePage != null) {
- handleContentOutlineSelection(contentOutlinePage.getSelection());
+ if (this.contentOutlinePage != null) {
+ handleContentOutlineSelection(this.contentOutlinePage.getSelection());
}
}
@@ -1360,37 +1318,37 @@ public class NattableconfigurationEditor
* @generated
*/
public IContentOutlinePage getContentOutlinePage() {
- if (contentOutlinePage == null) {
+ if (this.contentOutlinePage == null) {
// The content outline is just a tree.
//
class MyContentOutlinePage extends ContentOutlinePage {
@Override
public void createControl(Composite parent) {
super.createControl(parent);
- contentOutlineViewer = getTreeViewer();
- contentOutlineViewer.addSelectionChangedListener(this);
+ NattableconfigurationEditor.this.contentOutlineViewer = getTreeViewer();
+ NattableconfigurationEditor.this.contentOutlineViewer.addSelectionChangedListener(this);
// Set up the tree viewer.
//
- contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- contentOutlineViewer.setInput(editingDomain.getResourceSet());
+ NattableconfigurationEditor.this.contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(NattableconfigurationEditor.this.adapterFactory));
+ NattableconfigurationEditor.this.contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(NattableconfigurationEditor.this.adapterFactory));
+ NattableconfigurationEditor.this.contentOutlineViewer.setInput(NattableconfigurationEditor.this.editingDomain.getResourceSet());
// Make sure our popups work.
//
- createContextMenuFor(contentOutlineViewer);
+ createContextMenuFor(NattableconfigurationEditor.this.contentOutlineViewer);
- if (!editingDomain.getResourceSet().getResources().isEmpty()) {
+ if (!NattableconfigurationEditor.this.editingDomain.getResourceSet().getResources().isEmpty()) {
// Select the root object in the view.
//
- contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ NattableconfigurationEditor.this.contentOutlineViewer.setSelection(new StructuredSelection(NattableconfigurationEditor.this.editingDomain.getResourceSet().getResources().get(0)), true);
}
}
@Override
public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
super.makeContributions(menuManager, toolBarManager, statusLineManager);
- contentOutlineStatusLineManager = statusLineManager;
+ NattableconfigurationEditor.this.contentOutlineStatusLineManager = statusLineManager;
}
@Override
@@ -1400,11 +1358,11 @@ public class NattableconfigurationEditor
}
}
- contentOutlinePage = new MyContentOutlinePage();
+ this.contentOutlinePage = new MyContentOutlinePage();
// Listen to selection so that we can handle it is a special way.
//
- contentOutlinePage.addSelectionChangedListener
+ this.contentOutlinePage.addSelectionChangedListener
(new ISelectionChangedListener() {
// This ensures that we handle selections correctly.
//
@@ -1414,7 +1372,7 @@ public class NattableconfigurationEditor
});
}
- return contentOutlinePage;
+ return this.contentOutlinePage;
}
/**
@@ -1425,7 +1383,7 @@ public class NattableconfigurationEditor
*/
public IPropertySheetPage getPropertySheetPage() {
PropertySheetPage propertySheetPage =
- new ExtendedPropertySheetPage(editingDomain) {
+ new ExtendedPropertySheetPage(this.editingDomain) {
@Override
public void setSelectionToViewer(List<?> selection) {
NattableconfigurationEditor.this.setSelectionToViewer(selection);
@@ -1438,8 +1396,8 @@ public class NattableconfigurationEditor
getActionBarContributor().shareGlobalActions(this, actionBars);
}
};
- propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
- propertySheetPages.add(propertySheetPage);
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.propertySheetPages.add(propertySheetPage);
return propertySheetPage;
}
@@ -1451,7 +1409,7 @@ public class NattableconfigurationEditor
* @generated
*/
public void handleContentOutlineSelection(ISelection selection) {
- if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ if (this.currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator();
if (selectedElements.hasNext()) {
// Get the first selected element.
@@ -1460,7 +1418,7 @@ public class NattableconfigurationEditor
// If it's the selection viewer, then we want it to select the same selection as this selection.
//
- if (currentViewerPane.getViewer() == selectionViewer) {
+ if (this.currentViewerPane.getViewer() == this.selectionViewer) {
ArrayList<Object> selectionList = new ArrayList<Object>();
selectionList.add(selectedElement);
while (selectedElements.hasNext()) {
@@ -1469,14 +1427,14 @@ public class NattableconfigurationEditor
// Set the selection to the widget.
//
- selectionViewer.setSelection(new StructuredSelection(selectionList));
+ this.selectionViewer.setSelection(new StructuredSelection(selectionList));
}
else {
// Set the input to the widget.
//
- if (currentViewerPane.getViewer().getInput() != selectedElement) {
- currentViewerPane.getViewer().setInput(selectedElement);
- currentViewerPane.setTitle(selectedElement);
+ if (this.currentViewerPane.getViewer().getInput() != selectedElement) {
+ this.currentViewerPane.getViewer().setInput(selectedElement);
+ this.currentViewerPane.setTitle(selectedElement);
}
}
}
@@ -1491,14 +1449,15 @@ public class NattableconfigurationEditor
*/
@Override
public boolean isDirty() {
- return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
+ return ((BasicCommandStack)this.editingDomain.getCommandStack()).isSaveNeeded();
}
/**
* This is for implementing {@link IEditorPart} and simply saves the model file.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ *
+ * @generated NOT
*/
@Override
public void doSave(IProgressMonitor progressMonitor) {
@@ -1507,7 +1466,7 @@ public class NattableconfigurationEditor
final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);
-
+ saveOptions.put(XMIResource.OPTION_SAVE_TYPE_INFORMATION, true);
// Do the work within an operation because this is a long running activity that modifies the workbench.
//
WorkspaceModifyOperation operation =
@@ -1519,17 +1478,17 @@ public class NattableconfigurationEditor
// Save the resources to the file system.
//
boolean first = true;
- for (Resource resource : editingDomain.getResourceSet().getResources()) {
- if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
+ for (Resource resource : NattableconfigurationEditor.this.editingDomain.getResourceSet().getResources()) {
+ if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !NattableconfigurationEditor.this.editingDomain.isReadOnly(resource)) {
try {
long timeStamp = resource.getTimeStamp();
resource.save(saveOptions);
if (resource.getTimeStamp() != timeStamp) {
- savedResources.add(resource);
+ NattableconfigurationEditor.this.savedResources.add(resource);
}
}
catch (Exception exception) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ NattableconfigurationEditor.this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
first = false;
}
@@ -1537,7 +1496,7 @@ public class NattableconfigurationEditor
}
};
- updateProblemIndication = false;
+ this.updateProblemIndication = false;
try {
// This runs the options, and shows progress.
//
@@ -1545,7 +1504,7 @@ public class NattableconfigurationEditor
// Refresh the necessary state.
//
- ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
+ ((BasicCommandStack)this.editingDomain.getCommandStack()).saveIsDone();
firePropertyChange(IEditorPart.PROP_DIRTY);
}
catch (Exception exception) {
@@ -1553,7 +1512,7 @@ public class NattableconfigurationEditor
//
NattableEditorPlugin.INSTANCE.log(exception);
}
- updateProblemIndication = true;
+ this.updateProblemIndication = true;
updateProblemIndication();
}
@@ -1567,7 +1526,7 @@ public class NattableconfigurationEditor
protected boolean isPersisted(Resource resource) {
boolean result = false;
try {
- InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ InputStream stream = this.editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
if (stream != null) {
result = true;
stream.close();
@@ -1615,7 +1574,7 @@ public class NattableconfigurationEditor
* @generated
*/
protected void doSaveAs(URI uri, IEditorInput editorInput) {
- (editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ (this.editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
IProgressMonitor progressMonitor =
@@ -1631,7 +1590,7 @@ public class NattableconfigurationEditor
* @generated
*/
public void gotoMarker(IMarker marker) {
- List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker);
+ List<?> targetObjects = this.markerHelper.getTargetObjects(this.editingDomain, marker);
if (!targetObjects.isEmpty()) {
setSelectionToViewer(targetObjects);
}
@@ -1649,8 +1608,8 @@ public class NattableconfigurationEditor
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
site.setSelectionProvider(this);
- site.getPage().addPartListener(partListener);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
+ site.getPage().addPartListener(this.partListener);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this.resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
}
/**
@@ -1660,8 +1619,8 @@ public class NattableconfigurationEditor
*/
@Override
public void setFocus() {
- if (currentViewerPane != null) {
- currentViewerPane.setFocus();
+ if (this.currentViewerPane != null) {
+ this.currentViewerPane.setFocus();
}
else {
getControl(getActivePage()).setFocus();
@@ -1675,7 +1634,7 @@ public class NattableconfigurationEditor
* @generated
*/
public void addSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.add(listener);
+ this.selectionChangedListeners.add(listener);
}
/**
@@ -1685,7 +1644,7 @@ public class NattableconfigurationEditor
* @generated
*/
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.remove(listener);
+ this.selectionChangedListeners.remove(listener);
}
/**
@@ -1695,7 +1654,7 @@ public class NattableconfigurationEditor
* @generated
*/
public ISelection getSelection() {
- return editorSelection;
+ return this.editorSelection;
}
/**
@@ -1706,9 +1665,9 @@ public class NattableconfigurationEditor
* @generated
*/
public void setSelection(ISelection selection) {
- editorSelection = selection;
+ this.editorSelection = selection;
- for (ISelectionChangedListener listener : selectionChangedListeners) {
+ for (ISelectionChangedListener listener : this.selectionChangedListeners) {
listener.selectionChanged(new SelectionChangedEvent(this, selection));
}
setStatusLineManager(selection);
@@ -1720,8 +1679,8 @@ public class NattableconfigurationEditor
* @generated
*/
public void setStatusLineManager(ISelection selection) {
- IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?
- contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+ IStatusLineManager statusLineManager = this.currentViewer != null && this.currentViewer == this.contentOutlineViewer ?
+ this.contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
if (statusLineManager != null) {
if (selection instanceof IStructuredSelection) {
@@ -1732,7 +1691,7 @@ public class NattableconfigurationEditor
break;
}
case 1: {
- String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
+ String text = new AdapterFactoryItemDelegator(this.adapterFactory).getText(collection.iterator().next());
statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); //$NON-NLS-1$
break;
}
@@ -1802,7 +1761,7 @@ public class NattableconfigurationEditor
* @generated
*/
public AdapterFactory getAdapterFactory() {
- return adapterFactory;
+ return this.adapterFactory;
}
/**
@@ -1812,24 +1771,24 @@ public class NattableconfigurationEditor
*/
@Override
public void dispose() {
- updateProblemIndication = false;
+ this.updateProblemIndication = false;
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this.resourceChangeListener);
- getSite().getPage().removePartListener(partListener);
+ getSite().getPage().removePartListener(this.partListener);
- adapterFactory.dispose();
+ this.adapterFactory.dispose();
if (getActionBarContributor().getActiveEditor() == this) {
getActionBarContributor().setActiveEditor(null);
}
- for (PropertySheetPage propertySheetPage : propertySheetPages) {
+ for (PropertySheetPage propertySheetPage : this.propertySheetPages) {
propertySheetPage.dispose();
}
- if (contentOutlinePage != null) {
- contentOutlinePage.dispose();
+ if (this.contentOutlinePage != null) {
+ this.contentOutlinePage.dispose();
}
super.dispose();
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/presentation/NattablelabelproviderEditor.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/presentation/NattablelabelproviderEditor.java
index 5449a1c58dc..34f862a1ab6 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/presentation/NattablelabelproviderEditor.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablelabelprovider/presentation/NattablelabelproviderEditor.java
@@ -15,7 +15,6 @@ package org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.
import java.io.IOException;
import java.io.InputStream;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -34,24 +33,56 @@ import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.ResourcesPlugin;
-
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.ViewerPane;
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+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.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+import org.eclipse.emf.edit.ui.util.EditUIUtil;
+import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
-
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-
import org.eclipse.jface.util.LocalSelectionTransfer;
-
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -65,29 +96,29 @@ import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
-
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.provider.NattableaxisItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider.NattableaxisconfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider.NattableaxisproviderItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.NattableconfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider.NattablelabelproviderItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider.NattabletesterItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableItemProviderAdapterFactory;
import org.eclipse.swt.SWT;
-
import org.eclipse.swt.custom.CTabFolder;
-
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.Transfer;
-
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
-
import org.eclipse.swt.graphics.Point;
-
import org.eclipse.swt.layout.FillLayout;
-
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
-
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -95,92 +126,18 @@ import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
-
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.SaveAsDialog;
-
import org.eclipse.ui.ide.IGotoMarker;
-
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
-
import org.eclipse.ui.views.contentoutline.ContentOutline;
import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.PropertySheet;
import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.command.CommandStackListener;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.ui.MarkerHelper;
-import org.eclipse.emf.common.ui.ViewerPane;
-
-import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
-
-import org.eclipse.emf.common.ui.viewer.IViewerProvider;
-
-import org.eclipse.emf.common.util.BasicDiagnostic;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.common.util.URI;
-
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-import org.eclipse.emf.ecore.util.EContentAdapter;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-
-import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
-
-import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
-
-import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
-
-import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
-
-import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
-import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
-import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
-
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
-
-import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
-import org.eclipse.emf.edit.ui.util.EditUIUtil;
-
-import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider.NattablelabelproviderItemProviderAdapterFactory;
-
-import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider.NattableaxisconfigurationItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider.NattableaxisproviderItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.NattableconfigurationItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider.NattabletesterItemProviderAdapterFactory;
-import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableItemProviderAdapterFactory;
-
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
/**
* This is an example of a Nattablelabelprovider model editor.
@@ -349,14 +306,14 @@ public class NattablelabelproviderEditor
new IPartListener() {
public void partActivated(IWorkbenchPart p) {
if (p instanceof ContentOutline) {
- if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
+ if (((ContentOutline)p).getCurrentPage() == NattablelabelproviderEditor.this.contentOutlinePage) {
getActionBarContributor().setActiveEditor(NattablelabelproviderEditor.this);
- setCurrentViewer(contentOutlineViewer);
+ setCurrentViewer(NattablelabelproviderEditor.this.contentOutlineViewer);
}
}
else if (p instanceof PropertySheet) {
- if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
+ if (NattablelabelproviderEditor.this.propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
getActionBarContributor().setActiveEditor(NattablelabelproviderEditor.this);
handleActivate();
}
@@ -437,13 +394,13 @@ public class NattablelabelproviderEditor
Resource resource = (Resource)notification.getNotifier();
Diagnostic diagnostic = analyzeResourceProblems(resource, null);
if (diagnostic.getSeverity() != Diagnostic.OK) {
- resourceToDiagnosticMap.put(resource, diagnostic);
+ NattablelabelproviderEditor.this.resourceToDiagnosticMap.put(resource, diagnostic);
}
else {
- resourceToDiagnosticMap.remove(resource);
+ NattablelabelproviderEditor.this.resourceToDiagnosticMap.remove(resource);
}
- if (updateProblemIndication) {
+ if (NattablelabelproviderEditor.this.updateProblemIndication) {
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
@@ -468,8 +425,8 @@ public class NattablelabelproviderEditor
@Override
protected void unsetTarget(Resource target) {
basicUnsetTarget(target);
- resourceToDiagnosticMap.remove(target);
- if (updateProblemIndication) {
+ NattablelabelproviderEditor.this.resourceToDiagnosticMap.remove(target);
+ if (NattablelabelproviderEditor.this.updateProblemIndication) {
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
@@ -492,7 +449,7 @@ public class NattablelabelproviderEditor
IResourceDelta delta = event.getDelta();
try {
class ResourceDeltaVisitor implements IResourceDeltaVisitor {
- protected ResourceSet resourceSet = editingDomain.getResourceSet();
+ protected ResourceSet resourceSet = NattablelabelproviderEditor.this.editingDomain.getResourceSet();
protected Collection<Resource> changedResources = new ArrayList<Resource>();
protected Collection<Resource> removedResources = new ArrayList<Resource>();
@@ -500,13 +457,13 @@ public class NattablelabelproviderEditor
if (delta.getResource().getType() == IResource.FILE) {
if (delta.getKind() == IResourceDelta.REMOVED ||
delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
- Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
+ Resource resource = this.resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
if (resource != null) {
if (delta.getKind() == IResourceDelta.REMOVED) {
- removedResources.add(resource);
+ this.removedResources.add(resource);
}
- else if (!savedResources.remove(resource)) {
- changedResources.add(resource);
+ else if (!NattablelabelproviderEditor.this.savedResources.remove(resource)) {
+ this.changedResources.add(resource);
}
}
}
@@ -517,11 +474,11 @@ public class NattablelabelproviderEditor
}
public Collection<Resource> getChangedResources() {
- return changedResources;
+ return this.changedResources;
}
public Collection<Resource> getRemovedResources() {
- return removedResources;
+ return this.removedResources;
}
}
@@ -532,7 +489,7 @@ public class NattablelabelproviderEditor
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
- removedResources.addAll(visitor.getRemovedResources());
+ NattablelabelproviderEditor.this.removedResources.addAll(visitor.getRemovedResources());
if (!isDirty()) {
getSite().getPage().closeEditor(NattablelabelproviderEditor.this, false);
}
@@ -544,7 +501,7 @@ public class NattablelabelproviderEditor
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
- changedResources.addAll(visitor.getChangedResources());
+ NattablelabelproviderEditor.this.changedResources.addAll(visitor.getChangedResources());
if (getSite().getPage().getActiveEditor() == NattablelabelproviderEditor.this) {
handleActivate();
}
@@ -567,29 +524,29 @@ public class NattablelabelproviderEditor
protected void handleActivate() {
// Recompute the read only state.
//
- if (editingDomain.getResourceToReadOnlyMap() != null) {
- editingDomain.getResourceToReadOnlyMap().clear();
+ if (this.editingDomain.getResourceToReadOnlyMap() != null) {
+ this.editingDomain.getResourceToReadOnlyMap().clear();
// Refresh any actions that may become enabled or disabled.
//
setSelection(getSelection());
}
- if (!removedResources.isEmpty()) {
+ if (!this.removedResources.isEmpty()) {
if (handleDirtyConflict()) {
getSite().getPage().closeEditor(NattablelabelproviderEditor.this, false);
}
else {
- removedResources.clear();
- changedResources.clear();
- savedResources.clear();
+ this.removedResources.clear();
+ this.changedResources.clear();
+ this.savedResources.clear();
}
}
- else if (!changedResources.isEmpty()) {
- changedResources.removeAll(savedResources);
+ else if (!this.changedResources.isEmpty()) {
+ this.changedResources.removeAll(this.savedResources);
handleChangedResources();
- changedResources.clear();
- savedResources.clear();
+ this.changedResources.clear();
+ this.savedResources.clear();
}
}
@@ -600,32 +557,32 @@ public class NattablelabelproviderEditor
* @generated
*/
protected void handleChangedResources() {
- if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
+ if (!this.changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
if (isDirty()) {
- changedResources.addAll(editingDomain.getResourceSet().getResources());
+ this.changedResources.addAll(this.editingDomain.getResourceSet().getResources());
}
- editingDomain.getCommandStack().flush();
+ this.editingDomain.getCommandStack().flush();
- updateProblemIndication = false;
- for (Resource resource : changedResources) {
+ this.updateProblemIndication = false;
+ for (Resource resource : this.changedResources) {
if (resource.isLoaded()) {
resource.unload();
try {
resource.load(Collections.EMPTY_MAP);
}
catch (IOException exception) {
- if (!resourceToDiagnosticMap.containsKey(resource)) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ if (!this.resourceToDiagnosticMap.containsKey(resource)) {
+ this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
}
}
}
- if (AdapterFactoryEditingDomain.isStale(editorSelection)) {
+ if (AdapterFactoryEditingDomain.isStale(this.editorSelection)) {
setSelection(StructuredSelection.EMPTY);
}
- updateProblemIndication = true;
+ this.updateProblemIndication = true;
updateProblemIndication();
}
}
@@ -637,15 +594,15 @@ public class NattablelabelproviderEditor
* @generated
*/
protected void updateProblemIndication() {
- if (updateProblemIndication) {
+ if (this.updateProblemIndication) {
BasicDiagnostic diagnostic =
new BasicDiagnostic
(Diagnostic.OK,
"org.eclipse.papyrus.infra.nattable.model.editor", //$NON-NLS-1$
0,
null,
- new Object [] { editingDomain.getResourceSet() });
- for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) {
+ new Object [] { this.editingDomain.getResourceSet() });
+ for (Diagnostic childDiagnostic : this.resourceToDiagnosticMap.values()) {
if (childDiagnostic.getSeverity() != Diagnostic.OK) {
diagnostic.add(childDiagnostic);
}
@@ -661,7 +618,7 @@ public class NattablelabelproviderEditor
else if (diagnostic.getSeverity() != Diagnostic.OK) {
ProblemEditorPart problemEditorPart = new ProblemEditorPart();
problemEditorPart.setDiagnostic(diagnostic);
- problemEditorPart.setMarkerHelper(markerHelper);
+ problemEditorPart.setMarkerHelper(this.markerHelper);
try {
addPage(++lastEditorPage, problemEditorPart, getEditorInput());
setPageText(lastEditorPage, problemEditorPart.getPartName());
@@ -673,11 +630,11 @@ public class NattablelabelproviderEditor
}
}
- if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
- markerHelper.deleteMarkers(editingDomain.getResourceSet());
+ if (this.markerHelper.hasMarkers(this.editingDomain.getResourceSet())) {
+ this.markerHelper.deleteMarkers(this.editingDomain.getResourceSet());
if (diagnostic.getSeverity() != Diagnostic.OK) {
try {
- markerHelper.createMarkers(diagnostic);
+ this.markerHelper.createMarkers(diagnostic);
}
catch (CoreException exception) {
NattableEditorPlugin.INSTANCE.log(exception);
@@ -721,17 +678,18 @@ public class NattablelabelproviderEditor
protected void initializeEditingDomain() {
// Create an adapter factory that yields item providers.
//
- adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
-
- adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableconfigurationItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableaxisproviderItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattablelabelproviderItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableaxisconfigurationItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattabletesterItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+ this.adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ this.adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisproviderItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattablelabelproviderItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattabletesterItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
// Create the command stack that will notify this editor as commands are executed.
//
@@ -753,7 +711,7 @@ public class NattablelabelproviderEditor
if (mostRecentCommand != null) {
setSelectionToViewer(mostRecentCommand.getAffectedObjects());
}
- for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
+ for (Iterator<PropertySheetPage> i = NattablelabelproviderEditor.this.propertySheetPages.iterator(); i.hasNext(); ) {
PropertySheetPage propertySheetPage = i.next();
if (propertySheetPage.getControl().isDisposed()) {
i.remove();
@@ -769,7 +727,7 @@ public class NattablelabelproviderEditor
// Create the editing domain with a special command stack.
//
- editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ this.editingDomain = new AdapterFactoryEditingDomain(this.adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
/**
@@ -799,8 +757,8 @@ public class NattablelabelproviderEditor
public void run() {
// Try to select the items in the current content viewer of the editor.
//
- if (currentViewer != null) {
- currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
+ if (NattablelabelproviderEditor.this.currentViewer != null) {
+ NattablelabelproviderEditor.this.currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
}
}
};
@@ -817,7 +775,7 @@ public class NattablelabelproviderEditor
* @generated
*/
public EditingDomain getEditingDomain() {
- return editingDomain;
+ return this.editingDomain;
}
/**
@@ -885,13 +843,13 @@ public class NattablelabelproviderEditor
* @generated
*/
public void setCurrentViewerPane(ViewerPane viewerPane) {
- if (currentViewerPane != viewerPane) {
- if (currentViewerPane != null) {
- currentViewerPane.showFocus(false);
+ if (this.currentViewerPane != viewerPane) {
+ if (this.currentViewerPane != null) {
+ this.currentViewerPane.showFocus(false);
}
- currentViewerPane = viewerPane;
+ this.currentViewerPane = viewerPane;
}
- setCurrentViewer(currentViewerPane.getViewer());
+ setCurrentViewer(this.currentViewerPane.getViewer());
}
/**
@@ -904,11 +862,11 @@ public class NattablelabelproviderEditor
public void setCurrentViewer(Viewer viewer) {
// If it is changing...
//
- if (currentViewer != viewer) {
- if (selectionChangedListener == null) {
+ if (this.currentViewer != viewer) {
+ if (this.selectionChangedListener == null) {
// Create the listener on demand.
//
- selectionChangedListener =
+ this.selectionChangedListener =
new ISelectionChangedListener() {
// This just notifies those things that are affected by the section.
//
@@ -920,23 +878,23 @@ public class NattablelabelproviderEditor
// Stop listening to the old one.
//
- if (currentViewer != null) {
- currentViewer.removeSelectionChangedListener(selectionChangedListener);
+ if (this.currentViewer != null) {
+ this.currentViewer.removeSelectionChangedListener(this.selectionChangedListener);
}
// Start listening to the new one.
//
if (viewer != null) {
- viewer.addSelectionChangedListener(selectionChangedListener);
+ viewer.addSelectionChangedListener(this.selectionChangedListener);
}
// Remember it.
//
- currentViewer = viewer;
+ this.currentViewer = viewer;
// Set the editors selection based on the current viewer's selection.
//
- setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());
+ setSelection(this.currentViewer == null ? StructuredSelection.EMPTY : this.currentViewer.getSelection());
}
}
@@ -947,7 +905,7 @@ public class NattablelabelproviderEditor
* @generated
*/
public Viewer getViewer() {
- return currentViewer;
+ return this.currentViewer;
}
/**
@@ -968,7 +926,7 @@ public class NattablelabelproviderEditor
int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
- viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(this.editingDomain, viewer));
}
/**
@@ -984,18 +942,18 @@ public class NattablelabelproviderEditor
try {
// Load the resource through the editing domain.
//
- resource = editingDomain.getResourceSet().getResource(resourceURI, true);
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, true);
}
catch (Exception e) {
exception = e;
- resource = editingDomain.getResourceSet().getResource(resourceURI, false);
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, false);
}
Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
if (diagnostic.getSeverity() != Diagnostic.OK) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
- editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);
+ this.editingDomain.getResourceSet().eAdapters().add(this.problemIndicationAdapter);
}
/**
@@ -1065,17 +1023,17 @@ public class NattablelabelproviderEditor
};
viewerPane.createControl(getContainer());
- selectionViewer = (TreeViewer)viewerPane.getViewer();
- selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ this.selectionViewer = (TreeViewer)viewerPane.getViewer();
+ this.selectionViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
- selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- selectionViewer.setInput(editingDomain.getResourceSet());
- selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
- viewerPane.setTitle(editingDomain.getResourceSet());
+ this.selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
+ this.selectionViewer.setInput(this.editingDomain.getResourceSet());
+ this.selectionViewer.setSelection(new StructuredSelection(this.editingDomain.getResourceSet().getResources().get(0)), true);
+ viewerPane.setTitle(this.editingDomain.getResourceSet());
- new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
+ new AdapterFactoryTreeEditor(this.selectionViewer.getTree(), this.adapterFactory);
- createContextMenuFor(selectionViewer);
+ createContextMenuFor(this.selectionViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
}
@@ -1099,12 +1057,12 @@ public class NattablelabelproviderEditor
};
viewerPane.createControl(getContainer());
- parentViewer = (TreeViewer)viewerPane.getViewer();
- parentViewer.setAutoExpandLevel(30);
- parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
- parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.parentViewer = (TreeViewer)viewerPane.getViewer();
+ this.parentViewer.setAutoExpandLevel(30);
+ this.parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(this.adapterFactory));
+ this.parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(parentViewer);
+ createContextMenuFor(this.parentViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_ParentPage_label")); //$NON-NLS-1$
}
@@ -1125,11 +1083,11 @@ public class NattablelabelproviderEditor
}
};
viewerPane.createControl(getContainer());
- listViewer = (ListViewer)viewerPane.getViewer();
- listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.listViewer = (ListViewer)viewerPane.getViewer();
+ this.listViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.listViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(listViewer);
+ createContextMenuFor(this.listViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_ListPage_label")); //$NON-NLS-1$
}
@@ -1150,13 +1108,13 @@ public class NattablelabelproviderEditor
}
};
viewerPane.createControl(getContainer());
- treeViewer = (TreeViewer)viewerPane.getViewer();
- treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.treeViewer = (TreeViewer)viewerPane.getViewer();
+ this.treeViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
+ new AdapterFactoryTreeEditor(this.treeViewer.getTree(), this.adapterFactory);
- createContextMenuFor(treeViewer);
+ createContextMenuFor(this.treeViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TreePage_label")); //$NON-NLS-1$
}
@@ -1177,9 +1135,9 @@ public class NattablelabelproviderEditor
}
};
viewerPane.createControl(getContainer());
- tableViewer = (TableViewer)viewerPane.getViewer();
+ this.tableViewer = (TableViewer)viewerPane.getViewer();
- Table table = tableViewer.getTable();
+ Table table = this.tableViewer.getTable();
TableLayout layout = new TableLayout();
table.setLayout(layout);
table.setHeaderVisible(true);
@@ -1195,11 +1153,11 @@ public class NattablelabelproviderEditor
selfColumn.setText(getString("_UI_SelfColumn_label")); //$NON-NLS-1$
selfColumn.setResizable(true);
- tableViewer.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
- tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.tableViewer.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
+ this.tableViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(tableViewer);
+ createContextMenuFor(this.tableViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TablePage_label")); //$NON-NLS-1$
}
@@ -1221,9 +1179,9 @@ public class NattablelabelproviderEditor
};
viewerPane.createControl(getContainer());
- treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
+ this.treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
- Tree tree = treeViewerWithColumns.getTree();
+ Tree tree = this.treeViewerWithColumns.getTree();
tree.setLayoutData(new FillLayout());
tree.setHeaderVisible(true);
tree.setLinesVisible(true);
@@ -1238,11 +1196,11 @@ public class NattablelabelproviderEditor
selfColumn.setResizable(true);
selfColumn.setWidth(200);
- treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
- treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
+ this.treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(treeViewerWithColumns);
+ createContextMenuFor(this.treeViewerWithColumns);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); //$NON-NLS-1$
}
@@ -1263,10 +1221,10 @@ public class NattablelabelproviderEditor
boolean guard = false;
@Override
public void controlResized(ControlEvent event) {
- if (!guard) {
- guard = true;
+ if (!this.guard) {
+ this.guard = true;
hideTabs();
- guard = false;
+ this.guard = false;
}
}
});
@@ -1325,8 +1283,8 @@ public class NattablelabelproviderEditor
protected void pageChange(int pageIndex) {
super.pageChange(pageIndex);
- if (contentOutlinePage != null) {
- handleContentOutlineSelection(contentOutlinePage.getSelection());
+ if (this.contentOutlinePage != null) {
+ handleContentOutlineSelection(this.contentOutlinePage.getSelection());
}
}
@@ -1360,37 +1318,37 @@ public class NattablelabelproviderEditor
* @generated
*/
public IContentOutlinePage getContentOutlinePage() {
- if (contentOutlinePage == null) {
+ if (this.contentOutlinePage == null) {
// The content outline is just a tree.
//
class MyContentOutlinePage extends ContentOutlinePage {
@Override
public void createControl(Composite parent) {
super.createControl(parent);
- contentOutlineViewer = getTreeViewer();
- contentOutlineViewer.addSelectionChangedListener(this);
+ NattablelabelproviderEditor.this.contentOutlineViewer = getTreeViewer();
+ NattablelabelproviderEditor.this.contentOutlineViewer.addSelectionChangedListener(this);
// Set up the tree viewer.
//
- contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- contentOutlineViewer.setInput(editingDomain.getResourceSet());
+ NattablelabelproviderEditor.this.contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(NattablelabelproviderEditor.this.adapterFactory));
+ NattablelabelproviderEditor.this.contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(NattablelabelproviderEditor.this.adapterFactory));
+ NattablelabelproviderEditor.this.contentOutlineViewer.setInput(NattablelabelproviderEditor.this.editingDomain.getResourceSet());
// Make sure our popups work.
//
- createContextMenuFor(contentOutlineViewer);
+ createContextMenuFor(NattablelabelproviderEditor.this.contentOutlineViewer);
- if (!editingDomain.getResourceSet().getResources().isEmpty()) {
+ if (!NattablelabelproviderEditor.this.editingDomain.getResourceSet().getResources().isEmpty()) {
// Select the root object in the view.
//
- contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ NattablelabelproviderEditor.this.contentOutlineViewer.setSelection(new StructuredSelection(NattablelabelproviderEditor.this.editingDomain.getResourceSet().getResources().get(0)), true);
}
}
@Override
public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
super.makeContributions(menuManager, toolBarManager, statusLineManager);
- contentOutlineStatusLineManager = statusLineManager;
+ NattablelabelproviderEditor.this.contentOutlineStatusLineManager = statusLineManager;
}
@Override
@@ -1400,11 +1358,11 @@ public class NattablelabelproviderEditor
}
}
- contentOutlinePage = new MyContentOutlinePage();
+ this.contentOutlinePage = new MyContentOutlinePage();
// Listen to selection so that we can handle it is a special way.
//
- contentOutlinePage.addSelectionChangedListener
+ this.contentOutlinePage.addSelectionChangedListener
(new ISelectionChangedListener() {
// This ensures that we handle selections correctly.
//
@@ -1414,7 +1372,7 @@ public class NattablelabelproviderEditor
});
}
- return contentOutlinePage;
+ return this.contentOutlinePage;
}
/**
@@ -1425,7 +1383,7 @@ public class NattablelabelproviderEditor
*/
public IPropertySheetPage getPropertySheetPage() {
PropertySheetPage propertySheetPage =
- new ExtendedPropertySheetPage(editingDomain) {
+ new ExtendedPropertySheetPage(this.editingDomain) {
@Override
public void setSelectionToViewer(List<?> selection) {
NattablelabelproviderEditor.this.setSelectionToViewer(selection);
@@ -1438,8 +1396,8 @@ public class NattablelabelproviderEditor
getActionBarContributor().shareGlobalActions(this, actionBars);
}
};
- propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
- propertySheetPages.add(propertySheetPage);
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.propertySheetPages.add(propertySheetPage);
return propertySheetPage;
}
@@ -1451,7 +1409,7 @@ public class NattablelabelproviderEditor
* @generated
*/
public void handleContentOutlineSelection(ISelection selection) {
- if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ if (this.currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator();
if (selectedElements.hasNext()) {
// Get the first selected element.
@@ -1460,7 +1418,7 @@ public class NattablelabelproviderEditor
// If it's the selection viewer, then we want it to select the same selection as this selection.
//
- if (currentViewerPane.getViewer() == selectionViewer) {
+ if (this.currentViewerPane.getViewer() == this.selectionViewer) {
ArrayList<Object> selectionList = new ArrayList<Object>();
selectionList.add(selectedElement);
while (selectedElements.hasNext()) {
@@ -1469,14 +1427,14 @@ public class NattablelabelproviderEditor
// Set the selection to the widget.
//
- selectionViewer.setSelection(new StructuredSelection(selectionList));
+ this.selectionViewer.setSelection(new StructuredSelection(selectionList));
}
else {
// Set the input to the widget.
//
- if (currentViewerPane.getViewer().getInput() != selectedElement) {
- currentViewerPane.getViewer().setInput(selectedElement);
- currentViewerPane.setTitle(selectedElement);
+ if (this.currentViewerPane.getViewer().getInput() != selectedElement) {
+ this.currentViewerPane.getViewer().setInput(selectedElement);
+ this.currentViewerPane.setTitle(selectedElement);
}
}
}
@@ -1491,14 +1449,15 @@ public class NattablelabelproviderEditor
*/
@Override
public boolean isDirty() {
- return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
+ return ((BasicCommandStack)this.editingDomain.getCommandStack()).isSaveNeeded();
}
/**
* This is for implementing {@link IEditorPart} and simply saves the model file.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ *
+ * @generated NOT
*/
@Override
public void doSave(IProgressMonitor progressMonitor) {
@@ -1507,7 +1466,7 @@ public class NattablelabelproviderEditor
final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);
-
+ saveOptions.put(XMIResource.OPTION_SAVE_TYPE_INFORMATION, true);
// Do the work within an operation because this is a long running activity that modifies the workbench.
//
WorkspaceModifyOperation operation =
@@ -1519,17 +1478,17 @@ public class NattablelabelproviderEditor
// Save the resources to the file system.
//
boolean first = true;
- for (Resource resource : editingDomain.getResourceSet().getResources()) {
- if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
+ for (Resource resource : NattablelabelproviderEditor.this.editingDomain.getResourceSet().getResources()) {
+ if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !NattablelabelproviderEditor.this.editingDomain.isReadOnly(resource)) {
try {
long timeStamp = resource.getTimeStamp();
resource.save(saveOptions);
if (resource.getTimeStamp() != timeStamp) {
- savedResources.add(resource);
+ NattablelabelproviderEditor.this.savedResources.add(resource);
}
}
catch (Exception exception) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ NattablelabelproviderEditor.this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
first = false;
}
@@ -1537,7 +1496,7 @@ public class NattablelabelproviderEditor
}
};
- updateProblemIndication = false;
+ this.updateProblemIndication = false;
try {
// This runs the options, and shows progress.
//
@@ -1545,7 +1504,7 @@ public class NattablelabelproviderEditor
// Refresh the necessary state.
//
- ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
+ ((BasicCommandStack)this.editingDomain.getCommandStack()).saveIsDone();
firePropertyChange(IEditorPart.PROP_DIRTY);
}
catch (Exception exception) {
@@ -1553,7 +1512,7 @@ public class NattablelabelproviderEditor
//
NattableEditorPlugin.INSTANCE.log(exception);
}
- updateProblemIndication = true;
+ this.updateProblemIndication = true;
updateProblemIndication();
}
@@ -1567,7 +1526,7 @@ public class NattablelabelproviderEditor
protected boolean isPersisted(Resource resource) {
boolean result = false;
try {
- InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ InputStream stream = this.editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
if (stream != null) {
result = true;
stream.close();
@@ -1615,7 +1574,7 @@ public class NattablelabelproviderEditor
* @generated
*/
protected void doSaveAs(URI uri, IEditorInput editorInput) {
- (editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ (this.editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
IProgressMonitor progressMonitor =
@@ -1631,7 +1590,7 @@ public class NattablelabelproviderEditor
* @generated
*/
public void gotoMarker(IMarker marker) {
- List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker);
+ List<?> targetObjects = this.markerHelper.getTargetObjects(this.editingDomain, marker);
if (!targetObjects.isEmpty()) {
setSelectionToViewer(targetObjects);
}
@@ -1649,8 +1608,8 @@ public class NattablelabelproviderEditor
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
site.setSelectionProvider(this);
- site.getPage().addPartListener(partListener);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
+ site.getPage().addPartListener(this.partListener);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this.resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
}
/**
@@ -1660,8 +1619,8 @@ public class NattablelabelproviderEditor
*/
@Override
public void setFocus() {
- if (currentViewerPane != null) {
- currentViewerPane.setFocus();
+ if (this.currentViewerPane != null) {
+ this.currentViewerPane.setFocus();
}
else {
getControl(getActivePage()).setFocus();
@@ -1675,7 +1634,7 @@ public class NattablelabelproviderEditor
* @generated
*/
public void addSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.add(listener);
+ this.selectionChangedListeners.add(listener);
}
/**
@@ -1685,7 +1644,7 @@ public class NattablelabelproviderEditor
* @generated
*/
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.remove(listener);
+ this.selectionChangedListeners.remove(listener);
}
/**
@@ -1695,7 +1654,7 @@ public class NattablelabelproviderEditor
* @generated
*/
public ISelection getSelection() {
- return editorSelection;
+ return this.editorSelection;
}
/**
@@ -1706,9 +1665,9 @@ public class NattablelabelproviderEditor
* @generated
*/
public void setSelection(ISelection selection) {
- editorSelection = selection;
+ this.editorSelection = selection;
- for (ISelectionChangedListener listener : selectionChangedListeners) {
+ for (ISelectionChangedListener listener : this.selectionChangedListeners) {
listener.selectionChanged(new SelectionChangedEvent(this, selection));
}
setStatusLineManager(selection);
@@ -1720,8 +1679,8 @@ public class NattablelabelproviderEditor
* @generated
*/
public void setStatusLineManager(ISelection selection) {
- IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?
- contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+ IStatusLineManager statusLineManager = this.currentViewer != null && this.currentViewer == this.contentOutlineViewer ?
+ this.contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
if (statusLineManager != null) {
if (selection instanceof IStructuredSelection) {
@@ -1732,7 +1691,7 @@ public class NattablelabelproviderEditor
break;
}
case 1: {
- String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
+ String text = new AdapterFactoryItemDelegator(this.adapterFactory).getText(collection.iterator().next());
statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); //$NON-NLS-1$
break;
}
@@ -1802,7 +1761,7 @@ public class NattablelabelproviderEditor
* @generated
*/
public AdapterFactory getAdapterFactory() {
- return adapterFactory;
+ return this.adapterFactory;
}
/**
@@ -1812,24 +1771,24 @@ public class NattablelabelproviderEditor
*/
@Override
public void dispose() {
- updateProblemIndication = false;
+ this.updateProblemIndication = false;
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this.resourceChangeListener);
- getSite().getPage().removePartListener(partListener);
+ getSite().getPage().removePartListener(this.partListener);
- adapterFactory.dispose();
+ this.adapterFactory.dispose();
if (getActionBarContributor().getActiveEditor() == this) {
getActionBarContributor().setActiveEditor(null);
}
- for (PropertySheetPage propertySheetPage : propertySheetPages) {
+ for (PropertySheetPage propertySheetPage : this.propertySheetPages) {
propertySheetPage.dispose();
}
- if (contentOutlinePage != null) {
- contentOutlinePage.dispose();
+ if (this.contentOutlinePage != null) {
+ this.contentOutlinePage.dispose();
}
super.dispose();
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterEditor.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterEditor.java
index 6c20bfce81b..a9c21ee308a 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterEditor.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterEditor.java
@@ -15,7 +15,6 @@ package org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.present
import java.io.IOException;
import java.io.InputStream;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -34,24 +33,56 @@ import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.ResourcesPlugin;
-
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.ViewerPane;
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+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.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+import org.eclipse.emf.edit.ui.util.EditUIUtil;
+import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
-
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-
import org.eclipse.jface.util.LocalSelectionTransfer;
-
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -65,29 +96,29 @@ import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
-
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.provider.NattableaxisItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider.NattableaxisconfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider.NattableaxisproviderItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.NattableconfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider.NattablelabelproviderItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider.NattabletesterItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableItemProviderAdapterFactory;
import org.eclipse.swt.SWT;
-
import org.eclipse.swt.custom.CTabFolder;
-
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.Transfer;
-
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
-
import org.eclipse.swt.graphics.Point;
-
import org.eclipse.swt.layout.FillLayout;
-
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
-
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -95,93 +126,18 @@ import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
-
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.SaveAsDialog;
-
import org.eclipse.ui.ide.IGotoMarker;
-
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
-
import org.eclipse.ui.views.contentoutline.ContentOutline;
import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.PropertySheet;
import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.command.CommandStackListener;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.ui.MarkerHelper;
-import org.eclipse.emf.common.ui.ViewerPane;
-
-import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
-
-import org.eclipse.emf.common.ui.viewer.IViewerProvider;
-
-import org.eclipse.emf.common.util.BasicDiagnostic;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.common.util.URI;
-
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-import org.eclipse.emf.ecore.util.EContentAdapter;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-
-import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
-
-import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
-
-import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
-
-import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
-
-import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
-import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
-import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
-
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
-
-import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
-import org.eclipse.emf.edit.ui.util.EditUIUtil;
-
-import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider.NattabletesterItemProviderAdapterFactory;
-
-import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider.NattableaxisconfigurationItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider.NattableaxisproviderItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.NattableconfigurationItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider.NattablelabelproviderItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableItemProviderAdapterFactory;
-
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
/**
* This is an example of a Nattabletester model editor.
@@ -350,14 +306,14 @@ public class NattabletesterEditor
new IPartListener() {
public void partActivated(IWorkbenchPart p) {
if (p instanceof ContentOutline) {
- if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
+ if (((ContentOutline)p).getCurrentPage() == NattabletesterEditor.this.contentOutlinePage) {
getActionBarContributor().setActiveEditor(NattabletesterEditor.this);
- setCurrentViewer(contentOutlineViewer);
+ setCurrentViewer(NattabletesterEditor.this.contentOutlineViewer);
}
}
else if (p instanceof PropertySheet) {
- if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
+ if (NattabletesterEditor.this.propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
getActionBarContributor().setActiveEditor(NattabletesterEditor.this);
handleActivate();
}
@@ -438,13 +394,13 @@ public class NattabletesterEditor
Resource resource = (Resource)notification.getNotifier();
Diagnostic diagnostic = analyzeResourceProblems(resource, null);
if (diagnostic.getSeverity() != Diagnostic.OK) {
- resourceToDiagnosticMap.put(resource, diagnostic);
+ NattabletesterEditor.this.resourceToDiagnosticMap.put(resource, diagnostic);
}
else {
- resourceToDiagnosticMap.remove(resource);
+ NattabletesterEditor.this.resourceToDiagnosticMap.remove(resource);
}
- if (updateProblemIndication) {
+ if (NattabletesterEditor.this.updateProblemIndication) {
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
@@ -469,8 +425,8 @@ public class NattabletesterEditor
@Override
protected void unsetTarget(Resource target) {
basicUnsetTarget(target);
- resourceToDiagnosticMap.remove(target);
- if (updateProblemIndication) {
+ NattabletesterEditor.this.resourceToDiagnosticMap.remove(target);
+ if (NattabletesterEditor.this.updateProblemIndication) {
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
@@ -493,7 +449,7 @@ public class NattabletesterEditor
IResourceDelta delta = event.getDelta();
try {
class ResourceDeltaVisitor implements IResourceDeltaVisitor {
- protected ResourceSet resourceSet = editingDomain.getResourceSet();
+ protected ResourceSet resourceSet = NattabletesterEditor.this.editingDomain.getResourceSet();
protected Collection<Resource> changedResources = new ArrayList<Resource>();
protected Collection<Resource> removedResources = new ArrayList<Resource>();
@@ -501,13 +457,13 @@ public class NattabletesterEditor
if (delta.getResource().getType() == IResource.FILE) {
if (delta.getKind() == IResourceDelta.REMOVED ||
delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
- Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
+ Resource resource = this.resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
if (resource != null) {
if (delta.getKind() == IResourceDelta.REMOVED) {
- removedResources.add(resource);
+ this.removedResources.add(resource);
}
- else if (!savedResources.remove(resource)) {
- changedResources.add(resource);
+ else if (!NattabletesterEditor.this.savedResources.remove(resource)) {
+ this.changedResources.add(resource);
}
}
}
@@ -518,11 +474,11 @@ public class NattabletesterEditor
}
public Collection<Resource> getChangedResources() {
- return changedResources;
+ return this.changedResources;
}
public Collection<Resource> getRemovedResources() {
- return removedResources;
+ return this.removedResources;
}
}
@@ -533,7 +489,7 @@ public class NattabletesterEditor
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
- removedResources.addAll(visitor.getRemovedResources());
+ NattabletesterEditor.this.removedResources.addAll(visitor.getRemovedResources());
if (!isDirty()) {
getSite().getPage().closeEditor(NattabletesterEditor.this, false);
}
@@ -545,7 +501,7 @@ public class NattabletesterEditor
getSite().getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
- changedResources.addAll(visitor.getChangedResources());
+ NattabletesterEditor.this.changedResources.addAll(visitor.getChangedResources());
if (getSite().getPage().getActiveEditor() == NattabletesterEditor.this) {
handleActivate();
}
@@ -568,29 +524,29 @@ public class NattabletesterEditor
protected void handleActivate() {
// Recompute the read only state.
//
- if (editingDomain.getResourceToReadOnlyMap() != null) {
- editingDomain.getResourceToReadOnlyMap().clear();
+ if (this.editingDomain.getResourceToReadOnlyMap() != null) {
+ this.editingDomain.getResourceToReadOnlyMap().clear();
// Refresh any actions that may become enabled or disabled.
//
setSelection(getSelection());
}
- if (!removedResources.isEmpty()) {
+ if (!this.removedResources.isEmpty()) {
if (handleDirtyConflict()) {
getSite().getPage().closeEditor(NattabletesterEditor.this, false);
}
else {
- removedResources.clear();
- changedResources.clear();
- savedResources.clear();
+ this.removedResources.clear();
+ this.changedResources.clear();
+ this.savedResources.clear();
}
}
- else if (!changedResources.isEmpty()) {
- changedResources.removeAll(savedResources);
+ else if (!this.changedResources.isEmpty()) {
+ this.changedResources.removeAll(this.savedResources);
handleChangedResources();
- changedResources.clear();
- savedResources.clear();
+ this.changedResources.clear();
+ this.savedResources.clear();
}
}
@@ -601,32 +557,32 @@ public class NattabletesterEditor
* @generated
*/
protected void handleChangedResources() {
- if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
+ if (!this.changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
if (isDirty()) {
- changedResources.addAll(editingDomain.getResourceSet().getResources());
+ this.changedResources.addAll(this.editingDomain.getResourceSet().getResources());
}
- editingDomain.getCommandStack().flush();
+ this.editingDomain.getCommandStack().flush();
- updateProblemIndication = false;
- for (Resource resource : changedResources) {
+ this.updateProblemIndication = false;
+ for (Resource resource : this.changedResources) {
if (resource.isLoaded()) {
resource.unload();
try {
resource.load(Collections.EMPTY_MAP);
}
catch (IOException exception) {
- if (!resourceToDiagnosticMap.containsKey(resource)) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ if (!this.resourceToDiagnosticMap.containsKey(resource)) {
+ this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
}
}
}
- if (AdapterFactoryEditingDomain.isStale(editorSelection)) {
+ if (AdapterFactoryEditingDomain.isStale(this.editorSelection)) {
setSelection(StructuredSelection.EMPTY);
}
- updateProblemIndication = true;
+ this.updateProblemIndication = true;
updateProblemIndication();
}
}
@@ -638,15 +594,15 @@ public class NattabletesterEditor
* @generated
*/
protected void updateProblemIndication() {
- if (updateProblemIndication) {
+ if (this.updateProblemIndication) {
BasicDiagnostic diagnostic =
new BasicDiagnostic
(Diagnostic.OK,
"org.eclipse.papyrus.infra.nattable.model.editor", //$NON-NLS-1$
0,
null,
- new Object [] { editingDomain.getResourceSet() });
- for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) {
+ new Object [] { this.editingDomain.getResourceSet() });
+ for (Diagnostic childDiagnostic : this.resourceToDiagnosticMap.values()) {
if (childDiagnostic.getSeverity() != Diagnostic.OK) {
diagnostic.add(childDiagnostic);
}
@@ -662,7 +618,7 @@ public class NattabletesterEditor
else if (diagnostic.getSeverity() != Diagnostic.OK) {
ProblemEditorPart problemEditorPart = new ProblemEditorPart();
problemEditorPart.setDiagnostic(diagnostic);
- problemEditorPart.setMarkerHelper(markerHelper);
+ problemEditorPart.setMarkerHelper(this.markerHelper);
try {
addPage(++lastEditorPage, problemEditorPart, getEditorInput());
setPageText(lastEditorPage, problemEditorPart.getPartName());
@@ -674,11 +630,11 @@ public class NattabletesterEditor
}
}
- if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
- markerHelper.deleteMarkers(editingDomain.getResourceSet());
+ if (this.markerHelper.hasMarkers(this.editingDomain.getResourceSet())) {
+ this.markerHelper.deleteMarkers(this.editingDomain.getResourceSet());
if (diagnostic.getSeverity() != Diagnostic.OK) {
try {
- markerHelper.createMarkers(diagnostic);
+ this.markerHelper.createMarkers(diagnostic);
}
catch (CoreException exception) {
NattableEditorPlugin.INSTANCE.log(exception);
@@ -722,17 +678,18 @@ public class NattabletesterEditor
protected void initializeEditingDomain() {
// Create an adapter factory that yields item providers.
//
- adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
-
- adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableconfigurationItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableaxisproviderItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattablelabelproviderItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableaxisconfigurationItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattabletesterItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+ this.adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ this.adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisproviderItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattablelabelproviderItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattabletesterItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
// Create the command stack that will notify this editor as commands are executed.
//
@@ -754,7 +711,7 @@ public class NattabletesterEditor
if (mostRecentCommand != null) {
setSelectionToViewer(mostRecentCommand.getAffectedObjects());
}
- for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
+ for (Iterator<PropertySheetPage> i = NattabletesterEditor.this.propertySheetPages.iterator(); i.hasNext(); ) {
PropertySheetPage propertySheetPage = i.next();
if (propertySheetPage.getControl().isDisposed()) {
i.remove();
@@ -770,7 +727,7 @@ public class NattabletesterEditor
// Create the editing domain with a special command stack.
//
- editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ this.editingDomain = new AdapterFactoryEditingDomain(this.adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
/**
@@ -800,8 +757,8 @@ public class NattabletesterEditor
public void run() {
// Try to select the items in the current content viewer of the editor.
//
- if (currentViewer != null) {
- currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
+ if (NattabletesterEditor.this.currentViewer != null) {
+ NattabletesterEditor.this.currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
}
}
};
@@ -818,7 +775,7 @@ public class NattabletesterEditor
* @generated
*/
public EditingDomain getEditingDomain() {
- return editingDomain;
+ return this.editingDomain;
}
/**
@@ -886,13 +843,13 @@ public class NattabletesterEditor
* @generated
*/
public void setCurrentViewerPane(ViewerPane viewerPane) {
- if (currentViewerPane != viewerPane) {
- if (currentViewerPane != null) {
- currentViewerPane.showFocus(false);
+ if (this.currentViewerPane != viewerPane) {
+ if (this.currentViewerPane != null) {
+ this.currentViewerPane.showFocus(false);
}
- currentViewerPane = viewerPane;
+ this.currentViewerPane = viewerPane;
}
- setCurrentViewer(currentViewerPane.getViewer());
+ setCurrentViewer(this.currentViewerPane.getViewer());
}
/**
@@ -905,11 +862,11 @@ public class NattabletesterEditor
public void setCurrentViewer(Viewer viewer) {
// If it is changing...
//
- if (currentViewer != viewer) {
- if (selectionChangedListener == null) {
+ if (this.currentViewer != viewer) {
+ if (this.selectionChangedListener == null) {
// Create the listener on demand.
//
- selectionChangedListener =
+ this.selectionChangedListener =
new ISelectionChangedListener() {
// This just notifies those things that are affected by the section.
//
@@ -921,23 +878,23 @@ public class NattabletesterEditor
// Stop listening to the old one.
//
- if (currentViewer != null) {
- currentViewer.removeSelectionChangedListener(selectionChangedListener);
+ if (this.currentViewer != null) {
+ this.currentViewer.removeSelectionChangedListener(this.selectionChangedListener);
}
// Start listening to the new one.
//
if (viewer != null) {
- viewer.addSelectionChangedListener(selectionChangedListener);
+ viewer.addSelectionChangedListener(this.selectionChangedListener);
}
// Remember it.
//
- currentViewer = viewer;
+ this.currentViewer = viewer;
// Set the editors selection based on the current viewer's selection.
//
- setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());
+ setSelection(this.currentViewer == null ? StructuredSelection.EMPTY : this.currentViewer.getSelection());
}
}
@@ -948,7 +905,7 @@ public class NattabletesterEditor
* @generated
*/
public Viewer getViewer() {
- return currentViewer;
+ return this.currentViewer;
}
/**
@@ -969,7 +926,7 @@ public class NattabletesterEditor
int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
- viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(this.editingDomain, viewer));
}
/**
@@ -985,18 +942,18 @@ public class NattabletesterEditor
try {
// Load the resource through the editing domain.
//
- resource = editingDomain.getResourceSet().getResource(resourceURI, true);
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, true);
}
catch (Exception e) {
exception = e;
- resource = editingDomain.getResourceSet().getResource(resourceURI, false);
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, false);
}
Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
if (diagnostic.getSeverity() != Diagnostic.OK) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
- editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);
+ this.editingDomain.getResourceSet().eAdapters().add(this.problemIndicationAdapter);
}
/**
@@ -1066,17 +1023,17 @@ public class NattabletesterEditor
};
viewerPane.createControl(getContainer());
- selectionViewer = (TreeViewer)viewerPane.getViewer();
- selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ this.selectionViewer = (TreeViewer)viewerPane.getViewer();
+ this.selectionViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
- selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- selectionViewer.setInput(editingDomain.getResourceSet());
- selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
- viewerPane.setTitle(editingDomain.getResourceSet());
+ this.selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
+ this.selectionViewer.setInput(this.editingDomain.getResourceSet());
+ this.selectionViewer.setSelection(new StructuredSelection(this.editingDomain.getResourceSet().getResources().get(0)), true);
+ viewerPane.setTitle(this.editingDomain.getResourceSet());
- new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
+ new AdapterFactoryTreeEditor(this.selectionViewer.getTree(), this.adapterFactory);
- createContextMenuFor(selectionViewer);
+ createContextMenuFor(this.selectionViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
}
@@ -1100,12 +1057,12 @@ public class NattabletesterEditor
};
viewerPane.createControl(getContainer());
- parentViewer = (TreeViewer)viewerPane.getViewer();
- parentViewer.setAutoExpandLevel(30);
- parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
- parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.parentViewer = (TreeViewer)viewerPane.getViewer();
+ this.parentViewer.setAutoExpandLevel(30);
+ this.parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(this.adapterFactory));
+ this.parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(parentViewer);
+ createContextMenuFor(this.parentViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_ParentPage_label")); //$NON-NLS-1$
}
@@ -1126,11 +1083,11 @@ public class NattabletesterEditor
}
};
viewerPane.createControl(getContainer());
- listViewer = (ListViewer)viewerPane.getViewer();
- listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.listViewer = (ListViewer)viewerPane.getViewer();
+ this.listViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.listViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(listViewer);
+ createContextMenuFor(this.listViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_ListPage_label")); //$NON-NLS-1$
}
@@ -1151,13 +1108,13 @@ public class NattabletesterEditor
}
};
viewerPane.createControl(getContainer());
- treeViewer = (TreeViewer)viewerPane.getViewer();
- treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.treeViewer = (TreeViewer)viewerPane.getViewer();
+ this.treeViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
+ new AdapterFactoryTreeEditor(this.treeViewer.getTree(), this.adapterFactory);
- createContextMenuFor(treeViewer);
+ createContextMenuFor(this.treeViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TreePage_label")); //$NON-NLS-1$
}
@@ -1178,9 +1135,9 @@ public class NattabletesterEditor
}
};
viewerPane.createControl(getContainer());
- tableViewer = (TableViewer)viewerPane.getViewer();
+ this.tableViewer = (TableViewer)viewerPane.getViewer();
- Table table = tableViewer.getTable();
+ Table table = this.tableViewer.getTable();
TableLayout layout = new TableLayout();
table.setLayout(layout);
table.setHeaderVisible(true);
@@ -1196,11 +1153,11 @@ public class NattabletesterEditor
selfColumn.setText(getString("_UI_SelfColumn_label")); //$NON-NLS-1$
selfColumn.setResizable(true);
- tableViewer.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
- tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.tableViewer.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
+ this.tableViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(tableViewer);
+ createContextMenuFor(this.tableViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TablePage_label")); //$NON-NLS-1$
}
@@ -1222,9 +1179,9 @@ public class NattabletesterEditor
};
viewerPane.createControl(getContainer());
- treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
+ this.treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
- Tree tree = treeViewerWithColumns.getTree();
+ Tree tree = this.treeViewerWithColumns.getTree();
tree.setLayoutData(new FillLayout());
tree.setHeaderVisible(true);
tree.setLinesVisible(true);
@@ -1239,11 +1196,11 @@ public class NattabletesterEditor
selfColumn.setResizable(true);
selfColumn.setWidth(200);
- treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
- treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
+ this.treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(treeViewerWithColumns);
+ createContextMenuFor(this.treeViewerWithColumns);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); //$NON-NLS-1$
}
@@ -1264,10 +1221,10 @@ public class NattabletesterEditor
boolean guard = false;
@Override
public void controlResized(ControlEvent event) {
- if (!guard) {
- guard = true;
+ if (!this.guard) {
+ this.guard = true;
hideTabs();
- guard = false;
+ this.guard = false;
}
}
});
@@ -1326,8 +1283,8 @@ public class NattabletesterEditor
protected void pageChange(int pageIndex) {
super.pageChange(pageIndex);
- if (contentOutlinePage != null) {
- handleContentOutlineSelection(contentOutlinePage.getSelection());
+ if (this.contentOutlinePage != null) {
+ handleContentOutlineSelection(this.contentOutlinePage.getSelection());
}
}
@@ -1361,37 +1318,37 @@ public class NattabletesterEditor
* @generated
*/
public IContentOutlinePage getContentOutlinePage() {
- if (contentOutlinePage == null) {
+ if (this.contentOutlinePage == null) {
// The content outline is just a tree.
//
class MyContentOutlinePage extends ContentOutlinePage {
@Override
public void createControl(Composite parent) {
super.createControl(parent);
- contentOutlineViewer = getTreeViewer();
- contentOutlineViewer.addSelectionChangedListener(this);
+ NattabletesterEditor.this.contentOutlineViewer = getTreeViewer();
+ NattabletesterEditor.this.contentOutlineViewer.addSelectionChangedListener(this);
// Set up the tree viewer.
//
- contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- contentOutlineViewer.setInput(editingDomain.getResourceSet());
+ NattabletesterEditor.this.contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(NattabletesterEditor.this.adapterFactory));
+ NattabletesterEditor.this.contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(NattabletesterEditor.this.adapterFactory));
+ NattabletesterEditor.this.contentOutlineViewer.setInput(NattabletesterEditor.this.editingDomain.getResourceSet());
// Make sure our popups work.
//
- createContextMenuFor(contentOutlineViewer);
+ createContextMenuFor(NattabletesterEditor.this.contentOutlineViewer);
- if (!editingDomain.getResourceSet().getResources().isEmpty()) {
+ if (!NattabletesterEditor.this.editingDomain.getResourceSet().getResources().isEmpty()) {
// Select the root object in the view.
//
- contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ NattabletesterEditor.this.contentOutlineViewer.setSelection(new StructuredSelection(NattabletesterEditor.this.editingDomain.getResourceSet().getResources().get(0)), true);
}
}
@Override
public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
super.makeContributions(menuManager, toolBarManager, statusLineManager);
- contentOutlineStatusLineManager = statusLineManager;
+ NattabletesterEditor.this.contentOutlineStatusLineManager = statusLineManager;
}
@Override
@@ -1401,11 +1358,11 @@ public class NattabletesterEditor
}
}
- contentOutlinePage = new MyContentOutlinePage();
+ this.contentOutlinePage = new MyContentOutlinePage();
// Listen to selection so that we can handle it is a special way.
//
- contentOutlinePage.addSelectionChangedListener
+ this.contentOutlinePage.addSelectionChangedListener
(new ISelectionChangedListener() {
// This ensures that we handle selections correctly.
//
@@ -1415,7 +1372,7 @@ public class NattabletesterEditor
});
}
- return contentOutlinePage;
+ return this.contentOutlinePage;
}
/**
@@ -1426,7 +1383,7 @@ public class NattabletesterEditor
*/
public IPropertySheetPage getPropertySheetPage() {
PropertySheetPage propertySheetPage =
- new ExtendedPropertySheetPage(editingDomain) {
+ new ExtendedPropertySheetPage(this.editingDomain) {
@Override
public void setSelectionToViewer(List<?> selection) {
NattabletesterEditor.this.setSelectionToViewer(selection);
@@ -1439,8 +1396,8 @@ public class NattabletesterEditor
getActionBarContributor().shareGlobalActions(this, actionBars);
}
};
- propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
- propertySheetPages.add(propertySheetPage);
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.propertySheetPages.add(propertySheetPage);
return propertySheetPage;
}
@@ -1452,7 +1409,7 @@ public class NattabletesterEditor
* @generated
*/
public void handleContentOutlineSelection(ISelection selection) {
- if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ if (this.currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator();
if (selectedElements.hasNext()) {
// Get the first selected element.
@@ -1461,7 +1418,7 @@ public class NattabletesterEditor
// If it's the selection viewer, then we want it to select the same selection as this selection.
//
- if (currentViewerPane.getViewer() == selectionViewer) {
+ if (this.currentViewerPane.getViewer() == this.selectionViewer) {
ArrayList<Object> selectionList = new ArrayList<Object>();
selectionList.add(selectedElement);
while (selectedElements.hasNext()) {
@@ -1470,14 +1427,14 @@ public class NattabletesterEditor
// Set the selection to the widget.
//
- selectionViewer.setSelection(new StructuredSelection(selectionList));
+ this.selectionViewer.setSelection(new StructuredSelection(selectionList));
}
else {
// Set the input to the widget.
//
- if (currentViewerPane.getViewer().getInput() != selectedElement) {
- currentViewerPane.getViewer().setInput(selectedElement);
- currentViewerPane.setTitle(selectedElement);
+ if (this.currentViewerPane.getViewer().getInput() != selectedElement) {
+ this.currentViewerPane.getViewer().setInput(selectedElement);
+ this.currentViewerPane.setTitle(selectedElement);
}
}
}
@@ -1492,14 +1449,15 @@ public class NattabletesterEditor
*/
@Override
public boolean isDirty() {
- return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
+ return ((BasicCommandStack)this.editingDomain.getCommandStack()).isSaveNeeded();
}
/**
* This is for implementing {@link IEditorPart} and simply saves the model file.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ *
+ * @generated NOT
*/
@Override
public void doSave(IProgressMonitor progressMonitor) {
@@ -1508,7 +1466,7 @@ public class NattabletesterEditor
final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);
-
+ saveOptions.put(XMIResource.OPTION_SAVE_TYPE_INFORMATION, true);
// Do the work within an operation because this is a long running activity that modifies the workbench.
//
WorkspaceModifyOperation operation =
@@ -1520,17 +1478,17 @@ public class NattabletesterEditor
// Save the resources to the file system.
//
boolean first = true;
- for (Resource resource : editingDomain.getResourceSet().getResources()) {
- if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
+ for (Resource resource : NattabletesterEditor.this.editingDomain.getResourceSet().getResources()) {
+ if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !NattabletesterEditor.this.editingDomain.isReadOnly(resource)) {
try {
long timeStamp = resource.getTimeStamp();
resource.save(saveOptions);
if (resource.getTimeStamp() != timeStamp) {
- savedResources.add(resource);
+ NattabletesterEditor.this.savedResources.add(resource);
}
}
catch (Exception exception) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ NattabletesterEditor.this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
first = false;
}
@@ -1538,7 +1496,7 @@ public class NattabletesterEditor
}
};
- updateProblemIndication = false;
+ this.updateProblemIndication = false;
try {
// This runs the options, and shows progress.
//
@@ -1546,7 +1504,7 @@ public class NattabletesterEditor
// Refresh the necessary state.
//
- ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
+ ((BasicCommandStack)this.editingDomain.getCommandStack()).saveIsDone();
firePropertyChange(IEditorPart.PROP_DIRTY);
}
catch (Exception exception) {
@@ -1554,7 +1512,7 @@ public class NattabletesterEditor
//
NattableEditorPlugin.INSTANCE.log(exception);
}
- updateProblemIndication = true;
+ this.updateProblemIndication = true;
updateProblemIndication();
}
@@ -1568,7 +1526,7 @@ public class NattabletesterEditor
protected boolean isPersisted(Resource resource) {
boolean result = false;
try {
- InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ InputStream stream = this.editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
if (stream != null) {
result = true;
stream.close();
@@ -1616,7 +1574,7 @@ public class NattabletesterEditor
* @generated
*/
protected void doSaveAs(URI uri, IEditorInput editorInput) {
- (editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ (this.editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
IProgressMonitor progressMonitor =
@@ -1632,7 +1590,7 @@ public class NattabletesterEditor
* @generated
*/
public void gotoMarker(IMarker marker) {
- List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker);
+ List<?> targetObjects = this.markerHelper.getTargetObjects(this.editingDomain, marker);
if (!targetObjects.isEmpty()) {
setSelectionToViewer(targetObjects);
}
@@ -1650,8 +1608,8 @@ public class NattabletesterEditor
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
site.setSelectionProvider(this);
- site.getPage().addPartListener(partListener);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
+ site.getPage().addPartListener(this.partListener);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this.resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
}
/**
@@ -1661,8 +1619,8 @@ public class NattabletesterEditor
*/
@Override
public void setFocus() {
- if (currentViewerPane != null) {
- currentViewerPane.setFocus();
+ if (this.currentViewerPane != null) {
+ this.currentViewerPane.setFocus();
}
else {
getControl(getActivePage()).setFocus();
@@ -1676,7 +1634,7 @@ public class NattabletesterEditor
* @generated
*/
public void addSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.add(listener);
+ this.selectionChangedListeners.add(listener);
}
/**
@@ -1686,7 +1644,7 @@ public class NattabletesterEditor
* @generated
*/
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.remove(listener);
+ this.selectionChangedListeners.remove(listener);
}
/**
@@ -1696,7 +1654,7 @@ public class NattabletesterEditor
* @generated
*/
public ISelection getSelection() {
- return editorSelection;
+ return this.editorSelection;
}
/**
@@ -1707,9 +1665,9 @@ public class NattabletesterEditor
* @generated
*/
public void setSelection(ISelection selection) {
- editorSelection = selection;
+ this.editorSelection = selection;
- for (ISelectionChangedListener listener : selectionChangedListeners) {
+ for (ISelectionChangedListener listener : this.selectionChangedListeners) {
listener.selectionChanged(new SelectionChangedEvent(this, selection));
}
setStatusLineManager(selection);
@@ -1721,8 +1679,8 @@ public class NattabletesterEditor
* @generated
*/
public void setStatusLineManager(ISelection selection) {
- IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?
- contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+ IStatusLineManager statusLineManager = this.currentViewer != null && this.currentViewer == this.contentOutlineViewer ?
+ this.contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
if (statusLineManager != null) {
if (selection instanceof IStructuredSelection) {
@@ -1733,7 +1691,7 @@ public class NattabletesterEditor
break;
}
case 1: {
- String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
+ String text = new AdapterFactoryItemDelegator(this.adapterFactory).getText(collection.iterator().next());
statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); //$NON-NLS-1$
break;
}
@@ -1803,7 +1761,7 @@ public class NattabletesterEditor
* @generated
*/
public AdapterFactory getAdapterFactory() {
- return adapterFactory;
+ return this.adapterFactory;
}
/**
@@ -1813,24 +1771,24 @@ public class NattabletesterEditor
*/
@Override
public void dispose() {
- updateProblemIndication = false;
+ this.updateProblemIndication = false;
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this.resourceChangeListener);
- getSite().getPage().removePartListener(partListener);
+ getSite().getPage().removePartListener(this.partListener);
- adapterFactory.dispose();
+ this.adapterFactory.dispose();
if (getActionBarContributor().getActiveEditor() == this) {
getActionBarContributor().setActiveEditor(null);
}
- for (PropertySheetPage propertySheetPage : propertySheetPages) {
+ for (PropertySheetPage propertySheetPage : this.propertySheetPages) {
propertySheetPage.dispose();
}
- if (contentOutlinePage != null) {
- contentOutlinePage.dispose();
+ if (this.contentOutlinePage != null) {
+ this.contentOutlinePage.dispose();
}
super.dispose();
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterModelWizard.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterModelWizard.java
index 3e5a5104015..872662350fe 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterModelWizard.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterModelWizard.java
@@ -407,8 +407,7 @@ public class NattabletesterModelWizard extends Wizard implements INewWizard {
* @generated
*/
public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- {
+ Composite composite = new Composite(parent, SWT.NONE); {
GridLayout layout = new GridLayout();
layout.numColumns = 1;
layout.verticalSpacing = 12;
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/presentation/NattableEditor.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/presentation/NattableEditor.java
index 991b24697fe..94c2437a16d 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/presentation/NattableEditor.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/presentation/NattableEditor.java
@@ -15,7 +15,6 @@ package org.eclipse.papyrus.infra.nattable.model.nattable.presentation;
import java.io.IOException;
import java.io.InputStream;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -34,24 +33,56 @@ import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.ResourcesPlugin;
-
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.ViewerPane;
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+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.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+import org.eclipse.emf.edit.ui.util.EditUIUtil;
+import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
-
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-
import org.eclipse.jface.util.LocalSelectionTransfer;
-
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -65,29 +96,28 @@ import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
-
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.provider.NattableaxisItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider.NattableaxisconfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider.NattableaxisproviderItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.NattableconfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider.NattablelabelproviderItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider.NattabletesterItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableItemProviderAdapterFactory;
import org.eclipse.swt.SWT;
-
import org.eclipse.swt.custom.CTabFolder;
-
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.Transfer;
-
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
-
import org.eclipse.swt.graphics.Point;
-
import org.eclipse.swt.layout.FillLayout;
-
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
-
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -95,104 +125,33 @@ import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
-
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.SaveAsDialog;
-
import org.eclipse.ui.ide.IGotoMarker;
-
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
-
import org.eclipse.ui.views.contentoutline.ContentOutline;
import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.PropertySheet;
import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.command.CommandStackListener;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.ui.MarkerHelper;
-import org.eclipse.emf.common.ui.ViewerPane;
-
-import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
-
-import org.eclipse.emf.common.ui.viewer.IViewerProvider;
-
-import org.eclipse.emf.common.util.BasicDiagnostic;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.common.util.URI;
-
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-import org.eclipse.emf.ecore.util.EContentAdapter;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-
-import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
-
-import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
-
-import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
-
-import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
-
-import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
-import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
-import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
-
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
-
-import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
-import org.eclipse.emf.edit.ui.util.EditUIUtil;
-
-import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableItemProviderAdapterFactory;
-
-import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider.NattableaxisconfigurationItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider.NattableaxisproviderItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.NattableconfigurationItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider.NattablelabelproviderItemProviderAdapterFactory;
-
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider.NattabletesterItemProviderAdapterFactory;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
/**
* This is an example of a Nattable model editor.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
-public class NattableEditor
- extends MultiPageEditorPart
- implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker {
+public class NattableEditor extends MultiPageEditorPart implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker {
+
/**
* This keeps track of the editing domain that is used to track all changes to the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected AdapterFactoryEditingDomain editingDomain;
@@ -201,6 +160,7 @@ public class NattableEditor
* This is the one adapter factory used for providing views of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected ComposedAdapterFactory adapterFactory;
@@ -209,6 +169,7 @@ public class NattableEditor
* This is the content outline page.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected IContentOutlinePage contentOutlinePage;
@@ -217,6 +178,7 @@ public class NattableEditor
* This is a kludge...
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected IStatusLineManager contentOutlineStatusLineManager;
@@ -225,6 +187,7 @@ public class NattableEditor
* This is the content outline page's viewer.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected TreeViewer contentOutlineViewer;
@@ -233,6 +196,7 @@ public class NattableEditor
* This is the property sheet page.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected List<PropertySheetPage> propertySheetPages = new ArrayList<PropertySheetPage>();
@@ -242,6 +206,7 @@ public class NattableEditor
* The parent relation must be correctly defined for this to work.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected TreeViewer selectionViewer;
@@ -250,6 +215,7 @@ public class NattableEditor
* This inverts the roll of parent and child in the content provider and show parents as a tree.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected TreeViewer parentViewer;
@@ -258,6 +224,7 @@ public class NattableEditor
* This shows how a tree view works.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected TreeViewer treeViewer;
@@ -267,6 +234,7 @@ public class NattableEditor
* A list viewer doesn't support icons.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected ListViewer listViewer;
@@ -276,6 +244,7 @@ public class NattableEditor
* A table can be used as a list with icons.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected TableViewer tableViewer;
@@ -284,6 +253,7 @@ public class NattableEditor
* This shows how a tree view with columns works.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected TreeViewer treeViewerWithColumns;
@@ -292,6 +262,7 @@ public class NattableEditor
* This keeps track of the active viewer pane, in the book.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected ViewerPane currentViewerPane;
@@ -300,6 +271,7 @@ public class NattableEditor
* This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected Viewer currentViewer;
@@ -308,6 +280,7 @@ public class NattableEditor
* This listens to which ever viewer is active.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected ISelectionChangedListener selectionChangedListener;
@@ -316,6 +289,7 @@ public class NattableEditor
* This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected Collection<ISelectionChangedListener> selectionChangedListeners = new ArrayList<ISelectionChangedListener>();
@@ -324,6 +298,7 @@ public class NattableEditor
* This keeps track of the selection of the editor as a whole.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected ISelection editorSelection = StructuredSelection.EMPTY;
@@ -333,6 +308,7 @@ public class NattableEditor
* in Eclipse's Problems View.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected MarkerHelper markerHelper = new EditUIMarkerHelper();
@@ -341,46 +317,50 @@ public class NattableEditor
* This listens for when the outline becomes active
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
- protected IPartListener partListener =
- new IPartListener() {
- public void partActivated(IWorkbenchPart p) {
- if (p instanceof ContentOutline) {
- if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
- getActionBarContributor().setActiveEditor(NattableEditor.this);
+ protected IPartListener partListener = new IPartListener() {
- setCurrentViewer(contentOutlineViewer);
- }
- }
- else if (p instanceof PropertySheet) {
- if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
- getActionBarContributor().setActiveEditor(NattableEditor.this);
- handleActivate();
- }
+ public void partActivated(IWorkbenchPart p) {
+ if(p instanceof ContentOutline) {
+ if(((ContentOutline)p).getCurrentPage() == NattableEditor.this.contentOutlinePage) {
+ getActionBarContributor().setActiveEditor(NattableEditor.this);
+
+ setCurrentViewer(NattableEditor.this.contentOutlineViewer);
}
- else if (p == NattableEditor.this) {
+ } else if(p instanceof PropertySheet) {
+ if(NattableEditor.this.propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
+ getActionBarContributor().setActiveEditor(NattableEditor.this);
handleActivate();
}
+ } else if(p == NattableEditor.this) {
+ handleActivate();
}
- public void partBroughtToTop(IWorkbenchPart p) {
- // Ignore.
- }
- public void partClosed(IWorkbenchPart p) {
- // Ignore.
- }
- public void partDeactivated(IWorkbenchPart p) {
- // Ignore.
- }
- public void partOpened(IWorkbenchPart p) {
- // Ignore.
- }
- };
+ }
+
+ public void partBroughtToTop(IWorkbenchPart p) {
+ // Ignore.
+ }
+
+ public void partClosed(IWorkbenchPart p) {
+ // Ignore.
+ }
+
+ public void partDeactivated(IWorkbenchPart p) {
+ // Ignore.
+ }
+
+ public void partOpened(IWorkbenchPart p) {
+ // Ignore.
+ }
+ };
/**
* Resources that have been removed since last activation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected Collection<Resource> removedResources = new ArrayList<Resource>();
@@ -389,6 +369,7 @@ public class NattableEditor
* Resources that have been changed since last activation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected Collection<Resource> changedResources = new ArrayList<Resource>();
@@ -397,6 +378,7 @@ public class NattableEditor
* Resources that have been saved.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected Collection<Resource> savedResources = new ArrayList<Resource>();
@@ -405,6 +387,7 @@ public class NattableEditor
* Map to store the diagnostic associated with a resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected Map<Resource, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<Resource, Diagnostic>();
@@ -413,6 +396,7 @@ public class NattableEditor
* Controls whether the problem indication should be updated.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected boolean updateProblemIndication = true;
@@ -421,173 +405,173 @@ public class NattableEditor
* Adapter used to update the problem indication when resources are demanded loaded.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
- protected EContentAdapter problemIndicationAdapter =
- new EContentAdapter() {
- @Override
- public void notifyChanged(Notification notification) {
- if (notification.getNotifier() instanceof Resource) {
- switch (notification.getFeatureID(Resource.class)) {
- case Resource.RESOURCE__IS_LOADED:
- case Resource.RESOURCE__ERRORS:
- case Resource.RESOURCE__WARNINGS: {
- Resource resource = (Resource)notification.getNotifier();
- Diagnostic diagnostic = analyzeResourceProblems(resource, null);
- if (diagnostic.getSeverity() != Diagnostic.OK) {
- resourceToDiagnosticMap.put(resource, diagnostic);
- }
- else {
- resourceToDiagnosticMap.remove(resource);
- }
+ protected EContentAdapter problemIndicationAdapter = new EContentAdapter() {
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ if(notification.getNotifier() instanceof Resource) {
+ switch(notification.getFeatureID(Resource.class)) {
+ case Resource.RESOURCE__IS_LOADED:
+ case Resource.RESOURCE__ERRORS:
+ case Resource.RESOURCE__WARNINGS:
+ {
+ Resource resource = (Resource)notification.getNotifier();
+ Diagnostic diagnostic = analyzeResourceProblems(resource, null);
+ if(diagnostic.getSeverity() != Diagnostic.OK) {
+ NattableEditor.this.resourceToDiagnosticMap.put(resource, diagnostic);
+ } else {
+ NattableEditor.this.resourceToDiagnosticMap.remove(resource);
+ }
+
+ if(NattableEditor.this.updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
- if (updateProblemIndication) {
- getSite().getShell().getDisplay().asyncExec
- (new Runnable() {
- public void run() {
- updateProblemIndication();
- }
- });
+ public void run() {
+ updateProblemIndication();
}
- break;
- }
+ });
}
+ break;
}
- else {
- super.notifyChanged(notification);
}
+ } else {
+ super.notifyChanged(notification);
}
+ }
- @Override
- protected void setTarget(Resource target) {
- basicSetTarget(target);
- }
+ @Override
+ protected void setTarget(Resource target) {
+ basicSetTarget(target);
+ }
- @Override
- protected void unsetTarget(Resource target) {
- basicUnsetTarget(target);
- resourceToDiagnosticMap.remove(target);
- if (updateProblemIndication) {
- getSite().getShell().getDisplay().asyncExec
- (new Runnable() {
- public void run() {
- updateProblemIndication();
- }
- });
- }
+ @Override
+ protected void unsetTarget(Resource target) {
+ basicUnsetTarget(target);
+ NattableEditor.this.resourceToDiagnosticMap.remove(target);
+ if(NattableEditor.this.updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+
+ public void run() {
+ updateProblemIndication();
+ }
+ });
}
- };
+ }
+ };
/**
* This listens for workspace changes.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
- protected IResourceChangeListener resourceChangeListener =
- new IResourceChangeListener() {
- public void resourceChanged(IResourceChangeEvent event) {
- IResourceDelta delta = event.getDelta();
- try {
- class ResourceDeltaVisitor implements IResourceDeltaVisitor {
- protected ResourceSet resourceSet = editingDomain.getResourceSet();
- protected Collection<Resource> changedResources = new ArrayList<Resource>();
- protected Collection<Resource> removedResources = new ArrayList<Resource>();
-
- public boolean visit(IResourceDelta delta) {
- if (delta.getResource().getType() == IResource.FILE) {
- if (delta.getKind() == IResourceDelta.REMOVED ||
- delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
- Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
- if (resource != null) {
- if (delta.getKind() == IResourceDelta.REMOVED) {
- removedResources.add(resource);
- }
- else if (!savedResources.remove(resource)) {
- changedResources.add(resource);
- }
+ protected IResourceChangeListener resourceChangeListener = new IResourceChangeListener() {
+
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta delta = event.getDelta();
+ try {
+ class ResourceDeltaVisitor implements IResourceDeltaVisitor {
+
+ protected ResourceSet resourceSet = NattableEditor.this.editingDomain.getResourceSet();
+
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ public boolean visit(IResourceDelta delta) {
+ if(delta.getResource().getType() == IResource.FILE) {
+ if(delta.getKind() == IResourceDelta.REMOVED || delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
+ Resource resource = this.resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
+ if(resource != null) {
+ if(delta.getKind() == IResourceDelta.REMOVED) {
+ this.removedResources.add(resource);
+ } else if(!NattableEditor.this.savedResources.remove(resource)) {
+ this.changedResources.add(resource);
}
}
- return false;
}
-
- return true;
+ return false;
}
- public Collection<Resource> getChangedResources() {
- return changedResources;
- }
-
- public Collection<Resource> getRemovedResources() {
- return removedResources;
- }
+ return true;
}
- final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();
- delta.accept(visitor);
-
- if (!visitor.getRemovedResources().isEmpty()) {
- getSite().getShell().getDisplay().asyncExec
- (new Runnable() {
- public void run() {
- removedResources.addAll(visitor.getRemovedResources());
- if (!isDirty()) {
- getSite().getPage().closeEditor(NattableEditor.this, false);
- }
- }
- });
+ public Collection<Resource> getChangedResources() {
+ return this.changedResources;
}
- if (!visitor.getChangedResources().isEmpty()) {
- getSite().getShell().getDisplay().asyncExec
- (new Runnable() {
- public void run() {
- changedResources.addAll(visitor.getChangedResources());
- if (getSite().getPage().getActiveEditor() == NattableEditor.this) {
- handleActivate();
- }
- }
- });
+ public Collection<Resource> getRemovedResources() {
+ return this.removedResources;
}
}
- catch (CoreException exception) {
- NattableEditorPlugin.INSTANCE.log(exception);
+
+ final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();
+ delta.accept(visitor);
+
+ if(!visitor.getRemovedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+
+ public void run() {
+ NattableEditor.this.removedResources.addAll(visitor.getRemovedResources());
+ if(!isDirty()) {
+ getSite().getPage().closeEditor(NattableEditor.this, false);
+ }
+ }
+ });
+ }
+
+ if(!visitor.getChangedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+
+ public void run() {
+ NattableEditor.this.changedResources.addAll(visitor.getChangedResources());
+ if(getSite().getPage().getActiveEditor() == NattableEditor.this) {
+ handleActivate();
+ }
+ }
+ });
}
+ } catch (CoreException exception) {
+ NattableEditorPlugin.INSTANCE.log(exception);
}
- };
+ }
+ };
/**
* Handles activation of the editor or it's associated views.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void handleActivate() {
// Recompute the read only state.
//
- if (editingDomain.getResourceToReadOnlyMap() != null) {
- editingDomain.getResourceToReadOnlyMap().clear();
+ if(this.editingDomain.getResourceToReadOnlyMap() != null) {
+ this.editingDomain.getResourceToReadOnlyMap().clear();
- // Refresh any actions that may become enabled or disabled.
- //
- setSelection(getSelection());
+ // Refresh any actions that may become enabled or disabled.
+ //
+ setSelection(getSelection());
}
- if (!removedResources.isEmpty()) {
- if (handleDirtyConflict()) {
+ if(!this.removedResources.isEmpty()) {
+ if(handleDirtyConflict()) {
getSite().getPage().closeEditor(NattableEditor.this, false);
+ } else {
+ this.removedResources.clear();
+ this.changedResources.clear();
+ this.savedResources.clear();
}
- else {
- removedResources.clear();
- changedResources.clear();
- savedResources.clear();
- }
- }
- else if (!changedResources.isEmpty()) {
- changedResources.removeAll(savedResources);
+ } else if(!this.changedResources.isEmpty()) {
+ this.changedResources.removeAll(this.savedResources);
handleChangedResources();
- changedResources.clear();
- savedResources.clear();
+ this.changedResources.clear();
+ this.savedResources.clear();
}
}
@@ -595,35 +579,35 @@ public class NattableEditor
* Handles what to do with changed resources on activation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void handleChangedResources() {
- if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
- if (isDirty()) {
- changedResources.addAll(editingDomain.getResourceSet().getResources());
+ if(!this.changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
+ if(isDirty()) {
+ this.changedResources.addAll(this.editingDomain.getResourceSet().getResources());
}
- editingDomain.getCommandStack().flush();
+ this.editingDomain.getCommandStack().flush();
- updateProblemIndication = false;
- for (Resource resource : changedResources) {
- if (resource.isLoaded()) {
+ this.updateProblemIndication = false;
+ for(Resource resource : this.changedResources) {
+ if(resource.isLoaded()) {
resource.unload();
try {
resource.load(Collections.EMPTY_MAP);
- }
- catch (IOException exception) {
- if (!resourceToDiagnosticMap.containsKey(resource)) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ } catch (IOException exception) {
+ if(!this.resourceToDiagnosticMap.containsKey(resource)) {
+ this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
}
}
}
- if (AdapterFactoryEditingDomain.isStale(editorSelection)) {
+ if(AdapterFactoryEditingDomain.isStale(this.editorSelection)) {
setSelection(StructuredSelection.EMPTY);
}
- updateProblemIndication = true;
+ this.updateProblemIndication = true;
updateProblemIndication();
}
}
@@ -632,52 +616,45 @@ public class NattableEditor
* Updates the problems indication with the information described in the specified diagnostic.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void updateProblemIndication() {
- if (updateProblemIndication) {
- BasicDiagnostic diagnostic =
- new BasicDiagnostic
- (Diagnostic.OK,
- "org.eclipse.papyrus.infra.nattable.model.editor", //$NON-NLS-1$
- 0,
- null,
- new Object [] { editingDomain.getResourceSet() });
- for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) {
- if (childDiagnostic.getSeverity() != Diagnostic.OK) {
+ if(this.updateProblemIndication) {
+ BasicDiagnostic diagnostic = new BasicDiagnostic(Diagnostic.OK, "org.eclipse.papyrus.infra.nattable.model.editor", //$NON-NLS-1$
+ 0, null, new Object[]{ this.editingDomain.getResourceSet() });
+ for(Diagnostic childDiagnostic : this.resourceToDiagnosticMap.values()) {
+ if(childDiagnostic.getSeverity() != Diagnostic.OK) {
diagnostic.add(childDiagnostic);
}
}
int lastEditorPage = getPageCount() - 1;
- if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) {
+ if(lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) {
((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic);
- if (diagnostic.getSeverity() != Diagnostic.OK) {
+ if(diagnostic.getSeverity() != Diagnostic.OK) {
setActivePage(lastEditorPage);
}
- }
- else if (diagnostic.getSeverity() != Diagnostic.OK) {
+ } else if(diagnostic.getSeverity() != Diagnostic.OK) {
ProblemEditorPart problemEditorPart = new ProblemEditorPart();
problemEditorPart.setDiagnostic(diagnostic);
- problemEditorPart.setMarkerHelper(markerHelper);
+ problemEditorPart.setMarkerHelper(this.markerHelper);
try {
addPage(++lastEditorPage, problemEditorPart, getEditorInput());
setPageText(lastEditorPage, problemEditorPart.getPartName());
setActivePage(lastEditorPage);
showTabs();
- }
- catch (PartInitException exception) {
+ } catch (PartInitException exception) {
NattableEditorPlugin.INSTANCE.log(exception);
}
}
- if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
- markerHelper.deleteMarkers(editingDomain.getResourceSet());
- if (diagnostic.getSeverity() != Diagnostic.OK) {
+ if(this.markerHelper.hasMarkers(this.editingDomain.getResourceSet())) {
+ this.markerHelper.deleteMarkers(this.editingDomain.getResourceSet());
+ if(diagnostic.getSeverity() != Diagnostic.OK) {
try {
- markerHelper.createMarkers(diagnostic);
- }
- catch (CoreException exception) {
+ this.markerHelper.createMarkers(diagnostic);
+ } catch (CoreException exception) {
NattableEditorPlugin.INSTANCE.log(exception);
}
}
@@ -689,20 +666,19 @@ public class NattableEditor
* Shows a dialog that asks if conflicting changes should be discarded.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected boolean handleDirtyConflict() {
- return
- MessageDialog.openQuestion
- (getSite().getShell(),
- getString("_UI_FileConflict_label"), //$NON-NLS-1$
- getString("_WARN_FileConflict")); //$NON-NLS-1$
+ return MessageDialog.openQuestion(getSite().getShell(), getString("_UI_FileConflict_label"), //$NON-NLS-1$
+ getString("_WARN_FileConflict")); //$NON-NLS-1$
}
/**
* This creates a model editor.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public NattableEditor() {
@@ -714,22 +690,24 @@ public class NattableEditor
* This sets up the editing domain for the model editor.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void initializeEditingDomain() {
// Create an adapter factory that yields item providers.
//
- adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
-
- adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableconfigurationItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableaxisproviderItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattablelabelproviderItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattableaxisconfigurationItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new NattabletesterItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+ this.adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ this.adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisproviderItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattablelabelproviderItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattabletesterItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new NattableaxisItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
// Create the command stack that will notify this editor as commands are executed.
//
@@ -737,46 +715,46 @@ public class NattableEditor
// Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
//
- commandStack.addCommandStackListener
- (new CommandStackListener() {
- public void commandStackChanged(final EventObject event) {
- getContainer().getDisplay().asyncExec
- (new Runnable() {
- public void run() {
- firePropertyChange(IEditorPart.PROP_DIRTY);
-
- // Try to select the affected objects.
- //
- Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
- if (mostRecentCommand != null) {
- setSelectionToViewer(mostRecentCommand.getAffectedObjects());
- }
- for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
- PropertySheetPage propertySheetPage = i.next();
- if (propertySheetPage.getControl().isDisposed()) {
- i.remove();
- }
- else {
- propertySheetPage.refresh();
- }
- }
- }
- });
- }
- });
+ commandStack.addCommandStackListener(new CommandStackListener() {
+
+ public void commandStackChanged(final EventObject event) {
+ getContainer().getDisplay().asyncExec(new Runnable() {
+
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+
+ // Try to select the affected objects.
+ //
+ Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
+ if(mostRecentCommand != null) {
+ setSelectionToViewer(mostRecentCommand.getAffectedObjects());
+ }
+ for(Iterator<PropertySheetPage> i = NattableEditor.this.propertySheetPages.iterator(); i.hasNext();) {
+ PropertySheetPage propertySheetPage = i.next();
+ if(propertySheetPage.getControl().isDisposed()) {
+ i.remove();
+ } else {
+ propertySheetPage.refresh();
+ }
+ }
+ }
+ });
+ }
+ });
// Create the editing domain with a special command stack.
//
- editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ this.editingDomain = new AdapterFactoryEditingDomain(this.adapterFactory, commandStack, new HashMap<Resource, Boolean>());
}
/**
* This is here for the listener to be able to call it.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
- @Override
+ @Override
protected void firePropertyChange(int action) {
super.firePropertyChange(action);
}
@@ -785,48 +763,53 @@ public class NattableEditor
* This sets the selection into whichever viewer is active.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setSelectionToViewer(Collection<?> collection) {
final Collection<?> theSelection = collection;
// Make sure it's okay.
//
- if (theSelection != null && !theSelection.isEmpty()) {
- Runnable runnable =
- new Runnable() {
- public void run() {
- // Try to select the items in the current content viewer of the editor.
- //
- if (currentViewer != null) {
- currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
- }
+ if(theSelection != null && !theSelection.isEmpty()) {
+ Runnable runnable = new Runnable() {
+
+ public void run() {
+ // Try to select the items in the current content viewer of the editor.
+ //
+ if(NattableEditor.this.currentViewer != null) {
+ NattableEditor.this.currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
}
- };
+ }
+ };
getSite().getShell().getDisplay().asyncExec(runnable);
}
}
/**
* This returns the editing domain as required by the {@link IEditingDomainProvider} interface.
- * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain}
- * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}.
+ * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain} and for supporting
+ * {@link org.eclipse.emf.edit.ui.action.CommandAction}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EditingDomain getEditingDomain() {
- return editingDomain;
+ return this.editingDomain;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider {
+
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) {
@@ -836,10 +819,11 @@ public class NattableEditor
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
- public Object [] getElements(Object object) {
+ public Object[] getElements(Object object) {
Object parent = super.getParent(object);
return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
}
@@ -847,10 +831,11 @@ public class NattableEditor
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
- public Object [] getChildren(Object object) {
+ public Object[] getChildren(Object object) {
Object parent = super.getParent(object);
return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
}
@@ -858,6 +843,7 @@ public class NattableEditor
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -869,6 +855,7 @@ public class NattableEditor
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -880,16 +867,17 @@ public class NattableEditor
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setCurrentViewerPane(ViewerPane viewerPane) {
- if (currentViewerPane != viewerPane) {
- if (currentViewerPane != null) {
- currentViewerPane.showFocus(false);
+ if(this.currentViewerPane != viewerPane) {
+ if(this.currentViewerPane != null) {
+ this.currentViewerPane.showFocus(false);
}
- currentViewerPane = viewerPane;
+ this.currentViewerPane = viewerPane;
}
- setCurrentViewer(currentViewerPane.getViewer());
+ setCurrentViewer(this.currentViewerPane.getViewer());
}
/**
@@ -897,44 +885,45 @@ public class NattableEditor
* is the current one.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setCurrentViewer(Viewer viewer) {
// If it is changing...
//
- if (currentViewer != viewer) {
- if (selectionChangedListener == null) {
+ if(this.currentViewer != viewer) {
+ if(this.selectionChangedListener == null) {
// Create the listener on demand.
//
- selectionChangedListener =
- new ISelectionChangedListener() {
- // This just notifies those things that are affected by the section.
- //
- public void selectionChanged(SelectionChangedEvent selectionChangedEvent) {
- setSelection(selectionChangedEvent.getSelection());
- }
- };
+ this.selectionChangedListener = new ISelectionChangedListener() {
+
+ // This just notifies those things that are affected by the section.
+ //
+ public void selectionChanged(SelectionChangedEvent selectionChangedEvent) {
+ setSelection(selectionChangedEvent.getSelection());
+ }
+ };
}
// Stop listening to the old one.
//
- if (currentViewer != null) {
- currentViewer.removeSelectionChangedListener(selectionChangedListener);
+ if(this.currentViewer != null) {
+ this.currentViewer.removeSelectionChangedListener(this.selectionChangedListener);
}
// Start listening to the new one.
//
- if (viewer != null) {
- viewer.addSelectionChangedListener(selectionChangedListener);
+ if(viewer != null) {
+ viewer.addSelectionChangedListener(this.selectionChangedListener);
}
// Remember it.
//
- currentViewer = viewer;
+ this.currentViewer = viewer;
// Set the editors selection based on the current viewer's selection.
//
- setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());
+ setSelection(this.currentViewer == null ? StructuredSelection.EMPTY : this.currentViewer.getSelection());
}
}
@@ -942,16 +931,18 @@ public class NattableEditor
* This returns the viewer as required by the {@link IViewerProvider} interface.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public Viewer getViewer() {
- return currentViewer;
+ return this.currentViewer;
}
/**
* This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void createContextMenuFor(StructuredViewer viewer) {
@@ -959,20 +950,21 @@ public class NattableEditor
contextMenu.add(new Separator("additions")); //$NON-NLS-1$
contextMenu.setRemoveAllWhenShown(true);
contextMenu.addMenuListener(this);
- Menu menu= contextMenu.createContextMenu(viewer.getControl());
+ Menu menu = contextMenu.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));
int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
- Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
+ Transfer[] transfers = new Transfer[]{ LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
- viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(this.editingDomain, viewer));
}
/**
* This is the method called to load a resource into the editing domain's resource set based on the editor's input.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void createModel() {
@@ -982,18 +974,17 @@ public class NattableEditor
try {
// Load the resource through the editing domain.
//
- resource = editingDomain.getResourceSet().getResource(resourceURI, true);
- }
- catch (Exception e) {
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, true);
+ } catch (Exception e) {
exception = e;
- resource = editingDomain.getResourceSet().getResource(resourceURI, false);
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, false);
}
Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
- if (diagnostic.getSeverity() != Diagnostic.OK) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ if(diagnostic.getSeverity() != Diagnostic.OK) {
+ this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
- editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);
+ this.editingDomain.getResourceSet().eAdapters().add(this.problemIndicationAdapter);
}
/**
@@ -1001,30 +992,21 @@ public class NattableEditor
* and the specified exception (if any).
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) {
- if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
- BasicDiagnostic basicDiagnostic =
- new BasicDiagnostic
- (Diagnostic.ERROR,
- "org.eclipse.papyrus.infra.nattable.model.editor", //$NON-NLS-1$
- 0,
- getString("_UI_CreateModelError_message", resource.getURI()), //$NON-NLS-1$
- new Object [] { exception == null ? (Object)resource : exception });
+ if(!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
+ BasicDiagnostic basicDiagnostic = new BasicDiagnostic(Diagnostic.ERROR, "org.eclipse.papyrus.infra.nattable.model.editor", //$NON-NLS-1$
+ 0, getString("_UI_CreateModelError_message", resource.getURI()), //$NON-NLS-1$
+ new Object[]{ exception == null ? (Object)resource : exception });
basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));
return basicDiagnostic;
- }
- else if (exception != null) {
- return
- new BasicDiagnostic
- (Diagnostic.ERROR,
- "org.eclipse.papyrus.infra.nattable.model.editor", //$NON-NLS-1$
- 0,
- getString("_UI_CreateModelError_message", resource.getURI()), //$NON-NLS-1$
- new Object[] { exception });
- }
- else {
+ } else if(exception != null) {
+ return new BasicDiagnostic(Diagnostic.ERROR, "org.eclipse.papyrus.infra.nattable.model.editor", //$NON-NLS-1$
+ 0, getString("_UI_CreateModelError_message", resource.getURI()), //$NON-NLS-1$
+ new Object[]{ exception });
+ } else {
return Diagnostic.OK_INSTANCE;
}
}
@@ -1033,6 +1015,7 @@ public class NattableEditor
* This is the method used by the framework to install your own controls.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -1043,37 +1026,38 @@ public class NattableEditor
// Only creates the other pages if there is something that can be edited
//
- if (!getEditingDomain().getResourceSet().getResources().isEmpty()) {
+ if(!getEditingDomain().getResourceSet().getResources().isEmpty()) {
// Create a page for the selection tree view.
//
{
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), NattableEditor.this) {
- @Override
- public Viewer createViewer(Composite composite) {
- Tree tree = new Tree(composite, SWT.MULTI);
- TreeViewer newTreeViewer = new TreeViewer(tree);
- return newTreeViewer;
- }
- @Override
- public void requestActivation() {
- super.requestActivation();
- setCurrentViewerPane(this);
- }
- };
+ ViewerPane viewerPane = new ViewerPane(getSite().getPage(), NattableEditor.this) {
+
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
viewerPane.createControl(getContainer());
- selectionViewer = (TreeViewer)viewerPane.getViewer();
- selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ this.selectionViewer = (TreeViewer)viewerPane.getViewer();
+ this.selectionViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
- selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- selectionViewer.setInput(editingDomain.getResourceSet());
- selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
- viewerPane.setTitle(editingDomain.getResourceSet());
+ this.selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
+ this.selectionViewer.setInput(this.editingDomain.getResourceSet());
+ this.selectionViewer.setSelection(new StructuredSelection(this.editingDomain.getResourceSet().getResources().get(0)), true);
+ viewerPane.setTitle(this.editingDomain.getResourceSet());
- new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
+ new AdapterFactoryTreeEditor(this.selectionViewer.getTree(), this.adapterFactory);
- createContextMenuFor(selectionViewer);
+ createContextMenuFor(this.selectionViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
}
@@ -1081,28 +1065,29 @@ public class NattableEditor
// Create a page for the parent tree view.
//
{
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), NattableEditor.this) {
- @Override
- public Viewer createViewer(Composite composite) {
- Tree tree = new Tree(composite, SWT.MULTI);
- TreeViewer newTreeViewer = new TreeViewer(tree);
- return newTreeViewer;
- }
- @Override
- public void requestActivation() {
- super.requestActivation();
- setCurrentViewerPane(this);
- }
- };
+ ViewerPane viewerPane = new ViewerPane(getSite().getPage(), NattableEditor.this) {
+
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
viewerPane.createControl(getContainer());
- parentViewer = (TreeViewer)viewerPane.getViewer();
- parentViewer.setAutoExpandLevel(30);
- parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
- parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.parentViewer = (TreeViewer)viewerPane.getViewer();
+ this.parentViewer.setAutoExpandLevel(30);
+ this.parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(this.adapterFactory));
+ this.parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(parentViewer);
+ createContextMenuFor(this.parentViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_ParentPage_label")); //$NON-NLS-1$
}
@@ -1110,24 +1095,25 @@ public class NattableEditor
// This is the page for the list viewer
//
{
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), NattableEditor.this) {
- @Override
- public Viewer createViewer(Composite composite) {
- return new ListViewer(composite);
- }
- @Override
- public void requestActivation() {
- super.requestActivation();
- setCurrentViewerPane(this);
- }
- };
+ ViewerPane viewerPane = new ViewerPane(getSite().getPage(), NattableEditor.this) {
+
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new ListViewer(composite);
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
viewerPane.createControl(getContainer());
- listViewer = (ListViewer)viewerPane.getViewer();
- listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.listViewer = (ListViewer)viewerPane.getViewer();
+ this.listViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.listViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(listViewer);
+ createContextMenuFor(this.listViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_ListPage_label")); //$NON-NLS-1$
}
@@ -1135,26 +1121,27 @@ public class NattableEditor
// This is the page for the tree viewer
//
{
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), NattableEditor.this) {
- @Override
- public Viewer createViewer(Composite composite) {
- return new TreeViewer(composite);
- }
- @Override
- public void requestActivation() {
- super.requestActivation();
- setCurrentViewerPane(this);
- }
- };
+ ViewerPane viewerPane = new ViewerPane(getSite().getPage(), NattableEditor.this) {
+
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
viewerPane.createControl(getContainer());
- treeViewer = (TreeViewer)viewerPane.getViewer();
- treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.treeViewer = (TreeViewer)viewerPane.getViewer();
+ this.treeViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
+ new AdapterFactoryTreeEditor(this.treeViewer.getTree(), this.adapterFactory);
- createContextMenuFor(treeViewer);
+ createContextMenuFor(this.treeViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TreePage_label")); //$NON-NLS-1$
}
@@ -1162,22 +1149,23 @@ public class NattableEditor
// This is the page for the table viewer.
//
{
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), NattableEditor.this) {
- @Override
- public Viewer createViewer(Composite composite) {
- return new TableViewer(composite);
- }
- @Override
- public void requestActivation() {
- super.requestActivation();
- setCurrentViewerPane(this);
- }
- };
+ ViewerPane viewerPane = new ViewerPane(getSite().getPage(), NattableEditor.this) {
+
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TableViewer(composite);
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
viewerPane.createControl(getContainer());
- tableViewer = (TableViewer)viewerPane.getViewer();
+ this.tableViewer = (TableViewer)viewerPane.getViewer();
- Table table = tableViewer.getTable();
+ Table table = this.tableViewer.getTable();
TableLayout layout = new TableLayout();
table.setLayout(layout);
table.setHeaderVisible(true);
@@ -1193,11 +1181,11 @@ public class NattableEditor
selfColumn.setText(getString("_UI_SelfColumn_label")); //$NON-NLS-1$
selfColumn.setResizable(true);
- tableViewer.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
- tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.tableViewer.setColumnProperties(new String[]{ "a", "b" }); //$NON-NLS-1$ //$NON-NLS-2$
+ this.tableViewer.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(tableViewer);
+ createContextMenuFor(this.tableViewer);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TablePage_label")); //$NON-NLS-1$
}
@@ -1205,23 +1193,24 @@ public class NattableEditor
// This is the page for the table tree viewer.
//
{
- ViewerPane viewerPane =
- new ViewerPane(getSite().getPage(), NattableEditor.this) {
- @Override
- public Viewer createViewer(Composite composite) {
- return new TreeViewer(composite);
- }
- @Override
- public void requestActivation() {
- super.requestActivation();
- setCurrentViewerPane(this);
- }
- };
+ ViewerPane viewerPane = new ViewerPane(getSite().getPage(), NattableEditor.this) {
+
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
viewerPane.createControl(getContainer());
- treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
+ this.treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
- Tree tree = treeViewerWithColumns.getTree();
+ Tree tree = this.treeViewerWithColumns.getTree();
tree.setLayoutData(new FillLayout());
tree.setHeaderVisible(true);
tree.setLinesVisible(true);
@@ -1236,45 +1225,46 @@ public class NattableEditor
selfColumn.setResizable(true);
selfColumn.setWidth(200);
- treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
- treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ this.treeViewerWithColumns.setColumnProperties(new String[]{ "a", "b" }); //$NON-NLS-1$ //$NON-NLS-2$
+ this.treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(this.adapterFactory));
- createContextMenuFor(treeViewerWithColumns);
+ createContextMenuFor(this.treeViewerWithColumns);
int pageIndex = addPage(viewerPane.getControl());
setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); //$NON-NLS-1$
}
- getSite().getShell().getDisplay().asyncExec
- (new Runnable() {
- public void run() {
- setActivePage(0);
- }
- });
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+
+ public void run() {
+ setActivePage(0);
+ }
+ });
}
// Ensures that this editor will only display the page's tab
// area if there are more than one page
//
- getContainer().addControlListener
- (new ControlAdapter() {
- boolean guard = false;
- @Override
- public void controlResized(ControlEvent event) {
- if (!guard) {
- guard = true;
- hideTabs();
- guard = false;
- }
+ getContainer().addControlListener(new ControlAdapter() {
+
+ boolean guard = false;
+
+ @Override
+ public void controlResized(ControlEvent event) {
+ if(!this.guard) {
+ this.guard = true;
+ hideTabs();
+ this.guard = false;
}
- });
-
- getSite().getShell().getDisplay().asyncExec
- (new Runnable() {
- public void run() {
- updateProblemIndication();
- }
- });
+ }
+ });
+
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+
+ public void run() {
+ updateProblemIndication();
+ }
+ });
}
/**
@@ -1282,12 +1272,13 @@ public class NattableEditor
* this hides the single tab at the bottom.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void hideTabs() {
- if (getPageCount() <= 1) {
+ if(getPageCount() <= 1) {
setPageText(0, ""); //$NON-NLS-1$
- if (getContainer() instanceof CTabFolder) {
+ if(getContainer() instanceof CTabFolder) {
((CTabFolder)getContainer()).setTabHeight(1);
Point point = getContainer().getSize();
getContainer().setSize(point.x, point.y + 6);
@@ -1300,12 +1291,13 @@ public class NattableEditor
* this shows the tabs at the bottom.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void showTabs() {
- if (getPageCount() > 1) {
+ if(getPageCount() > 1) {
setPageText(0, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
- if (getContainer() instanceof CTabFolder) {
+ if(getContainer() instanceof CTabFolder) {
((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);
Point point = getContainer().getSize();
getContainer().setSize(point.x, point.y - 6);
@@ -1317,14 +1309,15 @@ public class NattableEditor
* This is used to track the active viewer.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
protected void pageChange(int pageIndex) {
super.pageChange(pageIndex);
- if (contentOutlinePage != null) {
- handleContentOutlineSelection(contentOutlinePage.getSelection());
+ if(this.contentOutlinePage != null) {
+ handleContentOutlineSelection(this.contentOutlinePage.getSelection());
}
}
@@ -1332,21 +1325,19 @@ public class NattableEditor
* This is how the framework determines which interfaces we implement.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@SuppressWarnings("rawtypes")
@Override
public Object getAdapter(Class key) {
- if (key.equals(IContentOutlinePage.class)) {
+ if(key.equals(IContentOutlinePage.class)) {
return showOutlineView() ? getContentOutlinePage() : null;
- }
- else if (key.equals(IPropertySheetPage.class)) {
+ } else if(key.equals(IPropertySheetPage.class)) {
return getPropertySheetPage();
- }
- else if (key.equals(IGotoMarker.class)) {
+ } else if(key.equals(IGotoMarker.class)) {
return this;
- }
- else {
+ } else {
return super.getAdapter(key);
}
}
@@ -1355,40 +1346,42 @@ public class NattableEditor
* This accesses a cached version of the content outliner.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public IContentOutlinePage getContentOutlinePage() {
- if (contentOutlinePage == null) {
+ if(this.contentOutlinePage == null) {
// The content outline is just a tree.
//
class MyContentOutlinePage extends ContentOutlinePage {
+
@Override
public void createControl(Composite parent) {
super.createControl(parent);
- contentOutlineViewer = getTreeViewer();
- contentOutlineViewer.addSelectionChangedListener(this);
+ NattableEditor.this.contentOutlineViewer = getTreeViewer();
+ NattableEditor.this.contentOutlineViewer.addSelectionChangedListener(this);
// Set up the tree viewer.
//
- contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
- contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- contentOutlineViewer.setInput(editingDomain.getResourceSet());
+ NattableEditor.this.contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(NattableEditor.this.adapterFactory));
+ NattableEditor.this.contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(NattableEditor.this.adapterFactory));
+ NattableEditor.this.contentOutlineViewer.setInput(NattableEditor.this.editingDomain.getResourceSet());
// Make sure our popups work.
//
- createContextMenuFor(contentOutlineViewer);
+ createContextMenuFor(NattableEditor.this.contentOutlineViewer);
- if (!editingDomain.getResourceSet().getResources().isEmpty()) {
- // Select the root object in the view.
- //
- contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ if(!NattableEditor.this.editingDomain.getResourceSet().getResources().isEmpty()) {
+ // Select the root object in the view.
+ //
+ NattableEditor.this.contentOutlineViewer.setSelection(new StructuredSelection(NattableEditor.this.editingDomain.getResourceSet().getResources().get(0)), true);
}
}
@Override
public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
super.makeContributions(menuManager, toolBarManager, statusLineManager);
- contentOutlineStatusLineManager = statusLineManager;
+ NattableEditor.this.contentOutlineStatusLineManager = statusLineManager;
}
@Override
@@ -1398,46 +1391,47 @@ public class NattableEditor
}
}
- contentOutlinePage = new MyContentOutlinePage();
+ this.contentOutlinePage = new MyContentOutlinePage();
// Listen to selection so that we can handle it is a special way.
//
- contentOutlinePage.addSelectionChangedListener
- (new ISelectionChangedListener() {
- // This ensures that we handle selections correctly.
- //
- public void selectionChanged(SelectionChangedEvent event) {
- handleContentOutlineSelection(event.getSelection());
- }
- });
+ this.contentOutlinePage.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ // This ensures that we handle selections correctly.
+ //
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleContentOutlineSelection(event.getSelection());
+ }
+ });
}
- return contentOutlinePage;
+ return this.contentOutlinePage;
}
/**
* This accesses a cached version of the property sheet.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public IPropertySheetPage getPropertySheetPage() {
- PropertySheetPage propertySheetPage =
- new ExtendedPropertySheetPage(editingDomain) {
- @Override
- public void setSelectionToViewer(List<?> selection) {
- NattableEditor.this.setSelectionToViewer(selection);
- NattableEditor.this.setFocus();
- }
+ PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage(this.editingDomain) {
- @Override
- public void setActionBars(IActionBars actionBars) {
- super.setActionBars(actionBars);
- getActionBarContributor().shareGlobalActions(this, actionBars);
- }
- };
- propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
- propertySheetPages.add(propertySheetPage);
+ @Override
+ public void setSelectionToViewer(List<?> selection) {
+ NattableEditor.this.setSelectionToViewer(selection);
+ NattableEditor.this.setFocus();
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ };
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ this.propertySheetPages.add(propertySheetPage);
return propertySheetPage;
}
@@ -1446,35 +1440,35 @@ public class NattableEditor
* This deals with how we want selection in the outliner to affect the other views.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void handleContentOutlineSelection(ISelection selection) {
- if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ if(this.currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator();
- if (selectedElements.hasNext()) {
+ if(selectedElements.hasNext()) {
// Get the first selected element.
//
Object selectedElement = selectedElements.next();
// If it's the selection viewer, then we want it to select the same selection as this selection.
//
- if (currentViewerPane.getViewer() == selectionViewer) {
+ if(this.currentViewerPane.getViewer() == this.selectionViewer) {
ArrayList<Object> selectionList = new ArrayList<Object>();
selectionList.add(selectedElement);
- while (selectedElements.hasNext()) {
+ while(selectedElements.hasNext()) {
selectionList.add(selectedElements.next());
}
// Set the selection to the widget.
//
- selectionViewer.setSelection(new StructuredSelection(selectionList));
- }
- else {
+ this.selectionViewer.setSelection(new StructuredSelection(selectionList));
+ } else {
// Set the input to the widget.
//
- if (currentViewerPane.getViewer().getInput() != selectedElement) {
- currentViewerPane.getViewer().setInput(selectedElement);
- currentViewerPane.setTitle(selectedElement);
+ if(this.currentViewerPane.getViewer().getInput() != selectedElement) {
+ this.currentViewerPane.getViewer().setInput(selectedElement);
+ this.currentViewerPane.setTitle(selectedElement);
}
}
}
@@ -1485,18 +1479,20 @@ public class NattableEditor
* This is for implementing {@link IEditorPart} and simply tests the command stack.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public boolean isDirty() {
- return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
+ return ((BasicCommandStack)this.editingDomain.getCommandStack()).isSaveNeeded();
}
/**
* This is for implementing {@link IEditorPart} and simply saves the model file.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ *
+ * @generated NOT
*/
@Override
public void doSave(IProgressMonitor progressMonitor) {
@@ -1505,37 +1501,36 @@ public class NattableEditor
final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);
-
+ saveOptions.put(XMIResource.OPTION_SAVE_TYPE_INFORMATION, true);
// Do the work within an operation because this is a long running activity that modifies the workbench.
//
- WorkspaceModifyOperation operation =
- new WorkspaceModifyOperation() {
- // This is the method that gets invoked when the operation runs.
+ WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
+
+ // This is the method that gets invoked when the operation runs.
+ //
+ @Override
+ public void execute(IProgressMonitor monitor) {
+ // Save the resources to the file system.
//
- @Override
- public void execute(IProgressMonitor monitor) {
- // Save the resources to the file system.
- //
- boolean first = true;
- for (Resource resource : editingDomain.getResourceSet().getResources()) {
- if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
- try {
- long timeStamp = resource.getTimeStamp();
- resource.save(saveOptions);
- if (resource.getTimeStamp() != timeStamp) {
- savedResources.add(resource);
- }
- }
- catch (Exception exception) {
- resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ boolean first = true;
+ for(Resource resource : NattableEditor.this.editingDomain.getResourceSet().getResources()) {
+ if((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !NattableEditor.this.editingDomain.isReadOnly(resource)) {
+ try {
+ long timeStamp = resource.getTimeStamp();
+ resource.save(saveOptions);
+ if(resource.getTimeStamp() != timeStamp) {
+ NattableEditor.this.savedResources.add(resource);
}
- first = false;
+ } catch (Exception exception) {
+ NattableEditor.this.resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
}
+ first = false;
}
}
- };
+ }
+ };
- updateProblemIndication = false;
+ this.updateProblemIndication = false;
try {
// This runs the options, and shows progress.
//
@@ -1543,15 +1538,14 @@ public class NattableEditor
// Refresh the necessary state.
//
- ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
+ ((BasicCommandStack)this.editingDomain.getCommandStack()).saveIsDone();
firePropertyChange(IEditorPart.PROP_DIRTY);
- }
- catch (Exception exception) {
+ } catch (Exception exception) {
// Something went wrong that shouldn't.
//
NattableEditorPlugin.INSTANCE.log(exception);
}
- updateProblemIndication = true;
+ this.updateProblemIndication = true;
updateProblemIndication();
}
@@ -1560,18 +1554,18 @@ public class NattableEditor
* The implementation uses the URI converter from the editor's resource set to try to open an input stream.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected boolean isPersisted(Resource resource) {
boolean result = false;
try {
- InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
- if (stream != null) {
+ InputStream stream = this.editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ if(stream != null) {
result = true;
stream.close();
}
- }
- catch (IOException e) {
+ } catch (IOException e) {
// Ignore
}
return result;
@@ -1581,6 +1575,7 @@ public class NattableEditor
* This always returns true because it is not currently supported.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -1592,6 +1587,7 @@ public class NattableEditor
* This also changes the editor's input.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -1599,9 +1595,9 @@ public class NattableEditor
SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
saveAsDialog.open();
IPath path = saveAsDialog.getResult();
- if (path != null) {
+ if(path != null) {
IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- if (file != null) {
+ if(file != null) {
doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
}
}
@@ -1610,27 +1606,26 @@ public class NattableEditor
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void doSaveAs(URI uri, IEditorInput editorInput) {
- (editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ (this.editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
- IProgressMonitor progressMonitor =
- getActionBars().getStatusLineManager() != null ?
- getActionBars().getStatusLineManager().getProgressMonitor() :
- new NullProgressMonitor();
+ IProgressMonitor progressMonitor = getActionBars().getStatusLineManager() != null ? getActionBars().getStatusLineManager().getProgressMonitor() : new NullProgressMonitor();
doSave(progressMonitor);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void gotoMarker(IMarker marker) {
- List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker);
- if (!targetObjects.isEmpty()) {
+ List<?> targetObjects = this.markerHelper.getTargetObjects(this.editingDomain, marker);
+ if(!targetObjects.isEmpty()) {
setSelectionToViewer(targetObjects);
}
}
@@ -1639,6 +1634,7 @@ public class NattableEditor
* This is called during startup.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -1647,21 +1643,21 @@ public class NattableEditor
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
site.setSelectionProvider(this);
- site.getPage().addPartListener(partListener);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
+ site.getPage().addPartListener(this.partListener);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this.resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public void setFocus() {
- if (currentViewerPane != null) {
- currentViewerPane.setFocus();
- }
- else {
+ if(this.currentViewerPane != null) {
+ this.currentViewerPane.setFocus();
+ } else {
getControl(getActivePage()).setFocus();
}
}
@@ -1670,30 +1666,33 @@ public class NattableEditor
* This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void addSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.add(listener);
+ this.selectionChangedListeners.add(listener);
}
/**
* This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.remove(listener);
+ this.selectionChangedListeners.remove(listener);
}
/**
* This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public ISelection getSelection() {
- return editorSelection;
+ return this.editorSelection;
}
/**
@@ -1701,12 +1700,13 @@ public class NattableEditor
* Calling this result will notify the listeners.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setSelection(ISelection selection) {
- editorSelection = selection;
+ this.editorSelection = selection;
- for (ISelectionChangedListener listener : selectionChangedListeners) {
+ for(ISelectionChangedListener listener : this.selectionChangedListeners) {
listener.selectionChanged(new SelectionChangedEvent(this, selection));
}
setStatusLineManager(selection);
@@ -1715,32 +1715,34 @@ public class NattableEditor
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setStatusLineManager(ISelection selection) {
- IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?
- contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+ IStatusLineManager statusLineManager = this.currentViewer != null && this.currentViewer == this.contentOutlineViewer ? this.contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
- if (statusLineManager != null) {
- if (selection instanceof IStructuredSelection) {
+ if(statusLineManager != null) {
+ if(selection instanceof IStructuredSelection) {
Collection<?> collection = ((IStructuredSelection)selection).toList();
- switch (collection.size()) {
- case 0: {
- statusLineManager.setMessage(getString("_UI_NoObjectSelected")); //$NON-NLS-1$
- break;
- }
- case 1: {
- String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
- statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); //$NON-NLS-1$
- break;
- }
- default: {
- statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); //$NON-NLS-1$
- break;
- }
+ switch(collection.size()) {
+ case 0:
+ {
+ statusLineManager.setMessage(getString("_UI_NoObjectSelected")); //$NON-NLS-1$
+ break;
}
- }
- else {
+ case 1:
+ {
+ String text = new AdapterFactoryItemDelegator(this.adapterFactory).getText(collection.iterator().next());
+ statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); //$NON-NLS-1$
+ break;
+ }
+ default:
+ {
+ statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); //$NON-NLS-1$
+ break;
+ }
+ }
+ } else {
statusLineManager.setMessage(""); //$NON-NLS-1$
}
}
@@ -1750,6 +1752,7 @@ public class NattableEditor
* This looks up a string in the plugin's plugin.properties file.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static String getString(String key) {
@@ -1760,16 +1763,18 @@ public class NattableEditor
* This looks up a string in plugin.properties, making a substitution.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static String getString(String key, Object s1) {
- return NattableEditorPlugin.INSTANCE.getString(key, new Object [] { s1 });
+ return NattableEditorPlugin.INSTANCE.getString(key, new Object[]{ s1 });
}
/**
* This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void menuAboutToShow(IMenuManager menuManager) {
@@ -1779,6 +1784,7 @@ public class NattableEditor
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EditingDomainActionBarContributor getActionBarContributor() {
@@ -1788,6 +1794,7 @@ public class NattableEditor
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public IActionBars getActionBars() {
@@ -1797,37 +1804,39 @@ public class NattableEditor
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public AdapterFactory getAdapterFactory() {
- return adapterFactory;
+ return this.adapterFactory;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public void dispose() {
- updateProblemIndication = false;
+ this.updateProblemIndication = false;
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this.resourceChangeListener);
- getSite().getPage().removePartListener(partListener);
+ getSite().getPage().removePartListener(this.partListener);
- adapterFactory.dispose();
+ this.adapterFactory.dispose();
- if (getActionBarContributor().getActiveEditor() == this) {
+ if(getActionBarContributor().getActiveEditor() == this) {
getActionBarContributor().setActiveEditor(null);
}
- for (PropertySheetPage propertySheetPage : propertySheetPages) {
+ for(PropertySheetPage propertySheetPage : this.propertySheetPages) {
propertySheetPage.dispose();
}
- if (contentOutlinePage != null) {
- contentOutlinePage.dispose();
+ if(this.contentOutlinePage != null) {
+ this.contentOutlinePage.dispose();
}
super.dispose();
@@ -1837,6 +1846,7 @@ public class NattableEditor
* Returns whether the outline view should be presented to the user.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected boolean showOutlineView() {

Back to the top