Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2013-07-11 09:27:47 +0000
committercletavernie2013-07-11 09:27:47 +0000
commit7815cd69843bbd697babf901185b4fa1fd83d03c (patch)
treebb509c44eec069975cfd00795976ab346cc582de /deprecated
parent8d083ddf6e900f4a03dd35a5479248e0f971338c (diff)
downloadorg.eclipse.papyrus-7815cd69843bbd697babf901185b4fa1fd83d03c.tar.gz
org.eclipse.papyrus-7815cd69843bbd697babf901185b4fa1fd83d03c.tar.xz
org.eclipse.papyrus-7815cd69843bbd697babf901185b4fa1fd83d03c.zip
[SVN] Move TableEFacet to the deprecated folder
Diffstat (limited to 'deprecated')
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/.classpath7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/.project34
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/META-INF/MANIFEST.MF16
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/OSGI-INF/l10n/bundle.properties3
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/about.html28
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/build.properties11
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/plugin.pdoc4
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/plugin.xml14
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/resources/emf_hidden_features.custom24
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/resources/papyrus_emf_facets.efacet9
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/src/org/eclipse/papyrus/infra/emf/efacet/Activator.java50
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/src/org/eclipse/papyrus/infra/emf/efacet/queries/SelfQuery.java30
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/.classpath7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/.project28
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/META-INF/MANIFEST.MF45
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/build.properties6
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/down.gifbin0 -> 541 bytes
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/table.gifbin0 -> 965 bytes
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/table.pngbin0 -> 1347 bytes
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/up.gifbin0 -> 542 bytes
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/plugin.xml146
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/Activator.java70
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/AbstractPapyrusNestedEditor.java407
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/AbstractSynchronizedTableEditor.java110
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/AbstractTableEditor.java506
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/EditorNameInitializer.java126
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/factory/AbstractTableEditorFactory.java197
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/factory/PapyrusCommandFactory.java303
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/factory/PapyrusTableEfacetCommandFactory.java120
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/AbstractCreateTableEditorHandler.java356
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/AbstractMoveRowHandler.java144
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/DownRowHandler.java43
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/UpRowHandler.java43
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/input/PapyrusTableEditorInput.java77
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/listener/AbstractTableTriggerListener.java111
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/listener/FillingListener.java371
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/listener/MoveTableLineListener.java91
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/modelresource/EMFFacetTableModelResource.java126
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/modelresource/PapyrusTableModelResource.java126
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/tester/TablePropertyTester.java46
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/.classpath7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/.project28
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/META-INF/MANIFEST.MF29
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/build.properties19
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/icons/full/obj16/PapyrusTable.gifbin0 -> 129 bytes
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/plugin.properties43
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/plugin.xml31
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/provider/PapyrusTableItemProvider.java358
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/provider/PapyrustableEditPlugin.java116
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/provider/PapyrustableItemProviderAdapterFactory.java209
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/.classpath7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/.project28
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/META-INF/MANIFEST.MF16
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/build.properties4
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/org.eclipse.papyrus.infra.efacet.metamodel.tests.launch41
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/src/org/eclipse/papyrus/infra/table/efacet/metamodel/tests/Activator.java66
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/src/org/eclipse/papyrus/infra/table/efacet/metamodel/tests/AllTests.java25
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/src/org/eclipse/papyrus/infra/table/efacet/metamodel/tests/generatednot/PapyrusTableTest.java55
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/.classpath8
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/.project29
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/META-INF/MANIFEST.MF21
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/build.properties20
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/model/papyrustable.ecore86
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/model/papyrustable.genmodel33
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/plugin.properties13
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/plugin.xml29
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/FillingMode.java245
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/PapyrusTable.java238
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/PapyrustableFactory.java52
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/PapyrustablePackage.java428
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/impl/PapyrusTableImpl.java537
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/impl/PapyrustableFactoryImpl.java156
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/impl/PapyrustablePackageImpl.java313
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/util/PapyrustableAdapterFactory.java147
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/util/PapyrustableSwitch.java136
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/TableContentsUtils.java79
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/.classpath7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/.project28
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/META-INF/MANIFEST.MF21
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/build.properties5
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/plugin.xml12
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/Activator.java50
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/AbstractTableEFacetHandler.java58
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/DeleteTableEFacetHandler.java79
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/DuplicateTableEFacetHandler.java80
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/RenameTableEFacetHandler.java84
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/messages/Messages.java21
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/messages/messages.properties3
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/.classpath7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/.project28
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/META-INF/MANIFEST.MF32
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/build.properties19
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/icons/full/ctool16/CreatePapyrusTableConfiguration_tableConfiguration_TableConfiguration.gifbin0 -> 223 bytes
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/icons/full/obj16/PapyrusTableConfiguration.gifbin0 -> 129 bytes
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/plugin.properties35
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/plugin.xml31
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/provider/PapyrusTableConfigurationItemProvider.java250
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/provider/PapyrustableconfigurationEditPlugin.java109
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/provider/PapyrustableconfigurationItemProviderAdapterFactory.java207
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/.classpath7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/.project28
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/META-INF/MANIFEST.MF29
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/build.properties19
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/icons/full/obj16/PapyrustableconfigurationModelFile.gifbin0 -> 346 bytes
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/icons/full/wizban/NewPapyrustableconfiguration.gifbin0 -> 2462 bytes
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/plugin.properties62
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/plugin.xml45
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationActionBarContributor.java430
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationEditor.java1855
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationEditorPlugin.java114
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationModelWizard.java613
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/.classpath7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/.project28
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/META-INF/MANIFEST.MF22
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/about.html28
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/build.properties19
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/documentation.pdoc4
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/model/papyrustableconfiguration.ecore36
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/model/papyrustableconfiguration.genmodel22
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/plugin.properties13
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/plugin.xml26
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/PapyrusTableConfiguration.java143
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/PapyrustableconfigurationFactory.java52
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/PapyrustableconfigurationPackage.java257
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/impl/PapyrusTableConfigurationImpl.java353
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/impl/PapyrustableconfigurationFactoryImpl.java104
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/impl/PapyrustableconfigurationPackageImpl.java231
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/util/PapyrustableconfigurationAdapterFactory.java147
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/util/PapyrustableconfigurationSwitch.java136
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/.classpath7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/.project28
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/META-INF/MANIFEST.MF23
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/about.html28
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/build.properties10
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/plugin.xml9
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/propertyView/environment.xmi9
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/propertyView/papyrustable/papyrustable.ctx73
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/propertyView/papyrustable/ui/MultiplePapyrusTable.xwt16
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/propertyView/papyrustable/ui/SinglePapyrusTable.xwt93
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/src/org/eclipse/papyrus/infra/table/efacet/properties/Activator.java69
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/src/org/eclipse/papyrus/infra/table/efacet/properties/modelelement/TableModelElement.java47
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/src/org/eclipse/papyrus/infra/table/efacet/properties/modelelement/TableModelElementFactory.java37
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/src/org/eclipse/papyrus/infra/table/efacet/properties/providers/ClassLabelProvider.java51
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.properties/src/org/eclipse/papyrus/infra/table/efacet/properties/providers/ContextFeatureContentProvider.java129
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/.classpath7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/.project40
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/META-INF/MANIFEST.MF27
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/build.properties6
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/plugin.xml31
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacetCustomization.uiCustom38
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacetQuery.querySet23
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacet_Facet.facetSet12
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/resources/TableEFacet_FacetCustomization.uiCustom13
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/Activator.java35
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/AbstractEditorContainerQuery.java33
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/AbstractGetEditorIconQuery.java57
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetContainedTables.java63
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetTableIcon.java17
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/GetTableName.java14
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet/src/org/eclipse/papyrus/infra/table/efacet/queries/IsTableContainer.java32
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/.classpath7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/.project28
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/META-INF/MANIFEST.MF24
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/about.html28
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/build.properties6
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/icons/generic_UML_table.gifbin0 -> 891 bytes
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/icons/generic_UML_table.pngbin0 -> 1245 bytes
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/plugin.pdoc4
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/plugin.properties3
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/plugin.xml123
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/resources/uml_generic_table.papyrustableconfiguration5
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/src/org/eclipse/papyrus/uml/table/efacet/generic/Activator.java67
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/src/org/eclipse/papyrus/uml/table/efacet/generic/editor/GenericTableEditor.java40
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/src/org/eclipse/papyrus/uml/table/efacet/generic/factory/GenericTableEditorFactory.java40
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/src/org/eclipse/papyrus/uml/table/efacet/generic/handlers/CreateGenericTableEditorHandler.java44
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.table.efacet.uml.generic/src/org/eclipse/papyrus/uml/table/efacet/generic/handlers/CreateGenericTableEditorHandlerWithouDialog.java33
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.uml.efacet/.classpath7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.uml.efacet/.project29
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.uml.efacet/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.uml.efacet/META-INF/MANIFEST.MF13
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.uml.efacet/build.properties5
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.uml.efacet/plugin.xml13
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.uml.efacet/resources/uml.efacet17
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.uml.efacet/resources/uml_label.custom15
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.uml.efacet/src/org/eclipse/papyrus/uml/efacet/Activator.java50
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.uml.efacet/src/org/eclipse/papyrus/uml/efacet/queries/GetStereotypedLabelForNamedElementQuery.java44
-rw-r--r--deprecated/TableEFacet/org.eclipse.papyrus.uml.efacet/src/org/eclipse/papyrus/uml/efacet/queries/IsUMLElementQuery.java68
192 files changed, 15315 insertions, 0 deletions
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/.classpath b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/.project b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/.project
new file mode 100644
index 00000000000..4ab84b621e1
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.emf.efacet</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.emf.facet.common.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.emf.facet.common.ProjectNature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/.settings/org.eclipse.jdt.core.prefs b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/META-INF/MANIFEST.MF b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..89faaf2daa3
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.emf.facet.util.emf.core,
+ org.eclipse.emf.facet.query.java.core,
+ org.eclipse.emf.ecore;bundle-version="2.8.0"
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.10.1.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.emf.efacet.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.infra.emf.efacet;singleton:=t
+ rue
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/OSGI-INF/l10n/bundle.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 00000000000..d40af2f2bce
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.infra.emf.efacet
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Facets and Customization for EMF (Incubation) \ No newline at end of file
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/about.html b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/build.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/build.properties
new file mode 100644
index 00000000000..94c218aef31
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/build.properties
@@ -0,0 +1,11 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ build.properties,\
+ resources/,\
+ plugin.xml,\
+ about.html,\
+ plugin.pdoc,\
+ OSGI-INF/
+src.includes = about.html
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/plugin.pdoc b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/plugin.pdoc
new file mode 100644
index 00000000000..92c84384166
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/plugin.pdoc
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin provides EMF customization : &#xD;&#xA;&#x9;- a custom to hide the eAnnotation feature&#xD;&#xA;&#x9;- a facet &quot;self&quot; to display the object itself">
+ <referent firstName="vincent" lastName="lorenzo" eMail="vincent.lorenzo@cea.fr" currentCompany="CEA-LIST"/>
+</doc:Documentation>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/plugin.xml b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/plugin.xml
new file mode 100644
index 00000000000..935d9afb021
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.emf.facet.util.emf.core.modeldeclaration">
+ <modeldeclaration
+ file="resources/emf_hidden_features.custom">
+ </modeldeclaration>
+ <modeldeclaration
+ file="resources/papyrus_emf_facets.efacet">
+ </modeldeclaration>
+ </extension>
+
+</plugin>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/resources/emf_hidden_features.custom b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/resources/emf_hidden_features.custom
new file mode 100644
index 00000000000..e99e520bc96
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/resources/emf_hidden_features.custom
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<custom:Customization xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:custom="http://www.eclipse.org/emf/facet/custom/0.2.incubation/custom" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:efacet="http://www.eclipse.org/emf/facet/efacet/0.2.incubation/efacet" xmlns:query="http://www.eclipse.org/emf/facet/efacet/0.2.incubation/efacet/query" name="emf_hidden_features">
+ <eClassifiers xsi:type="custom:EClassCustomization" conformanceTypedElement="//@eClassifiers.0/isConforming">
+ <extendedMetaclass href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ <facetElements xsi:type="efacet:FacetAttribute" name="isConforming" derived="true">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <query xsi:type="query:IsOneOfQuery">
+ <expectedEObjects href="http://www.eclipse.org/emf/2002/Ecore#//EModelElement/eAnnotations"/>
+ </query>
+ </facetElements>
+ <facetOperations name="isVisible" lowerBound="1">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
+ <eParameters name="eStructuralFeature">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <value xsi:type="query:FalseLiteralQuery"/>
+ </cases>
+ </query>
+ <override xsi:type="efacet:FacetOperation" href="platform:/plugin/org.eclipse.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/isVisible"/>
+ </facetOperations>
+ </eClassifiers>
+</custom:Customization>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/resources/papyrus_emf_facets.efacet b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/resources/papyrus_emf_facets.efacet
new file mode 100644
index 00000000000..100b206701a
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/resources/papyrus_emf_facets.efacet
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ASCII"?>
+<efacet:FacetSet 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:efacet="http://www.eclipse.org/emf/facet/efacet/0.2.incubation/efacet" name="papyrus emf facetset">
+ <eClassifiers xsi:type="efacet:Facet" name="papyrus_emf_facets">
+ <extendedMetaclass href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <facetElements xsi:type="efacet:FacetReference" name="self" changeable="false" derived="true" documentation="This facet provides the element itself to display it in a table.">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </facetElements>
+ </eClassifiers>
+</efacet:FacetSet>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/src/org/eclipse/papyrus/infra/emf/efacet/Activator.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/src/org/eclipse/papyrus/infra/emf/efacet/Activator.java
new file mode 100644
index 00000000000..7360e3ae846
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/src/org/eclipse/papyrus/infra/emf/efacet/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.papyrus.infra.emf.efacet;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.emf.efacet"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/src/org/eclipse/papyrus/infra/emf/efacet/queries/SelfQuery.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/src/org/eclipse/papyrus/infra/emf/efacet/queries/SelfQuery.java
new file mode 100644
index 00000000000..449c804312a
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.emf.efacet/src/org/eclipse/papyrus/infra/emf/efacet/queries/SelfQuery.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA-LIST) - Bug 372243 - Facet extending EObject to provide eClass(), eContainer(), etc.
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.emf.efacet.queries;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.emf.facet.query.java.core.IParameterValueList2;
+
+public class SelfQuery implements IJavaQuery2<EObject, EObject> {
+
+ public EObject evaluate(final EObject source,
+ final IParameterValueList2 parameterValues,
+ final IFacetManager facetManager)
+ throws DerivedTypedElementException {
+ return source;
+ }
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/.classpath b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/.classpath
new file mode 100644
index 00000000000..55b6205754a
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry excluding="org/eclipse/papyrus/infra/table/efacet/common/modelresource/EMFFacetTableModelResource.java|org/eclipse/papyrus/infra/table/efacet/common/copy/CustomizationUtils.java|org/eclipse/papyrus/infra/table/efacet/common/copy/TableInstanceUtils.java|org/eclipse/papyrus/infra/table/efacet/common/listener/TableFillingModeListener.java" kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/.project b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/.project
new file mode 100644
index 00000000000..1c89b79096c
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.table.efacet.common</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/.settings/org.eclipse.jdt.core.prefs b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/META-INF/MANIFEST.MF b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..bbff1b31f5a
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/META-INF/MANIFEST.MF
@@ -0,0 +1,45 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.emf.edit,
+ org.eclipse.emf.transaction,
+ org.eclipse.papyrus.infra.core;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.table.efacet.metamodel;bundle-version="0.10.1",
+ org.eclipse.emf.facet.widgets.table.ui,
+ org.eclipse.emf.workspace,
+ org.eclipse.core.databinding,
+ org.eclipse.emf.facet.widgets.nattable,
+ org.eclipse.papyrus.infra.widgets;bundle-version="0.10.1",
+ org.eclipse.emf.facet.widgets.nattable.instance,
+ org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.table.efacet.metamodel.edit;bundle-version="0.10.1",
+ org.eclipse.gmf.runtime.emf.commands.core,
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
+ net.sourceforge.nattable.core;bundle-version="2.1.0",
+ org.eclipse.core.expressions,
+ org.eclipse.papyrus.infra.services.edit;bundle-version="0.10.1",
+ org.eclipse.emf.facet.widgets.celleditors.editor;bundle-version="0.2.0",
+ org.eclipse.emf.facet.widgets.celleditors.ecore;bundle-version="0.2.0",
+ org.eclipse.emf.facet.efacet.core,
+ org.eclipse.emf.facet.util.core,
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="0.10.1",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.core.sasheditor.di;bundle-version="0.10.1",
+ org.eclipse.emf.edit.ui;bundle-version="2.8.0"
+Export-Package: org.eclipse.papyrus.infra.table.efacet.common.editor,
+ org.eclipse.papyrus.infra.table.efacet.common.factory,
+ org.eclipse.papyrus.infra.table.efacet.common.handlers,
+ org.eclipse.papyrus.infra.table.efacet.common.listener
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.10.1.qualifier
+Bundle-Name: Common Plugin for the efacet table editor (Incubation)
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.table.efacet.common.Activa
+ tor
+Bundle-SymbolicName: org.eclipse.papyrus.infra.table.efacet.common;sin
+ gleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/build.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/build.properties
new file mode 100644
index 00000000000..259d16dfc42
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ build.properties
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/down.gif b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/down.gif
new file mode 100644
index 00000000000..47b36723730
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/down.gif
Binary files differ
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/table.gif b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/table.gif
new file mode 100644
index 00000000000..4c9048708b0
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/table.gif
Binary files differ
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/table.png b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/table.png
new file mode 100644
index 00000000000..2a979527f4a
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/table.png
Binary files differ
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/up.gif b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/up.gif
new file mode 100644
index 00000000000..2dd3d81fe53
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/icons/up.gif
Binary files differ
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/plugin.xml b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/plugin.xml
new file mode 100644
index 00000000000..467a5c5e259
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/plugin.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.core.model">
+ <model
+ classname="org.eclipse.papyrus.infra.table.efacet.common.modelresource.PapyrusTableModelResource"
+ description="Model Resource for Papyrus Table EFacet ">
+ </model>
+ </extension>
+<extension id="papyrus.table.menuspapyrus.table.menu" name="Papyrus Table Menus" point="org.eclipse.ui.menus">
+ <menuContribution allPopups="false" locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup?after=org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
+ <menu icon="icons/table.gif" id="org.eclipse.papyrus.views.modelexplorer.popupmenu.table.efacet.creation" label="New EFacet Table" mnemonic="&amp;T" tooltip="The table menu">
+ </menu>
+ </menuContribution>
+ <menuContribution allPopups="false" locationURI="menu:org.eclipse.papyrus.ui.menu?after=org.eclipse.papyrus.uml.diagram.ui.menu.diagrams">
+ <menu icon="icons/table.gif" id="org.eclipse.papyrus.ui.menu.efacet.table.creation" label="EFacet Tables" mnemonic="&amp;T" tooltip="The table menu">
+ </menu>
+ </menuContribution>
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?endof=org.eclipse.papyrus.uml.diagram.ui.toolbar">
+ <toolbar id="org.eclipse.papyrus.toolbar.table.efacet.creation" label="Papyrus EFacet Table Toolbar">
+ </toolbar>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.emf.facet.widgets.table.command.category"
+ description="Move the line up"
+ id="org.eclipse.papyrus.infra.table.efacet.common.command.moveuprow"
+ name="Move Line Up">
+ </command>
+ <command
+ categoryId="org.eclipse.emf.facet.widgets.table.command.category"
+ description="Move the line down"
+ id="org.eclipse.papyrus.infra.table.efacet.common.command.movedownrow"
+ name="Move Line Down">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.ui.popup.any">
+ <command
+ commandId="org.eclipse.papyrus.infra.table.efacet.common.command.moveuprow"
+ icon="icons/up.gif"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ <with
+ variable="activePart">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.infra.table.efacet.common.propertyTester.isPapyrusTableEfacet"
+ value="true">
+ </test>
+ </with>
+ </and>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.infra.table.efacet.common.command.movedownrow"
+ icon="icons/down.gif"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ <with
+ variable="activePart">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.infra.table.efacet.common.propertyTester.isPapyrusTableEfacet"
+ value="true">
+ </test>
+ </with>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.infra.table.efacet.common.handlers.DownRowHandler"
+ commandId="org.eclipse.papyrus.infra.table.efacet.common.command.movedownrow">
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.infra.table.efacet.common.handlers.UpRowHandler"
+ commandId="org.eclipse.papyrus.infra.table.efacet.common.command.moveuprow">
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.papyrus.infra.table.efacet.common.command.moveuprow"
+ contextId="org.eclipse.papyrus.infra.table.efacet.common.context"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="ALT+ARROW_UP">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.infra.table.efacet.common.command.movedownrow"
+ contextId="org.eclipse.papyrus.infra.table.efacet.common.context"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="ALT+ARROW_DOWN">
+ </key>
+ </extension>
+ <extension
+ point="org.eclipse.ui.contexts">
+ <context
+ description="Papyrus Table Context"
+ id="org.eclipse.papyrus.infra.table.efacet.common.context"
+ name="Papyrus Table Context"
+ parentId="org.eclipse.ui.contexts.window">
+ </context>
+ </extension>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.papyrus.infra.table.efacet.common.tester.TablePropertyTester"
+ id="org.eclipse.papyrus.infra.table.efacet.common.propertyTester"
+ namespace="org.eclipse.papyrus.infra.table.efacet.common.propertyTester"
+ properties="isPapyrusTableEfacet"
+ type="org.eclipse.ui.IWorkbenchPart">
+ </propertyTester>
+ </extension>
+ <extension
+ point="org.eclipse.emf.facet.widgets.celleditors.commandFactories">
+ <commandFactory
+ class="org.eclipse.papyrus.infra.table.efacet.common.factory.PapyrusCommandFactory">
+ </commandFactory>
+ </extension>
+</plugin>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/Activator.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/Activator.java
new file mode 100644
index 00000000000..695bdeb5b78
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/Activator.java
@@ -0,0 +1,70 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.common;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.table.efacet.common"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(final BundleContext context) throws Exception {
+ super.start(context);
+ this.log = new LogHelper(this);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(final BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/AbstractPapyrusNestedEditor.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/AbstractPapyrusNestedEditor.java
new file mode 100644
index 00000000000..2b7b819fd9b
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/AbstractPapyrusNestedEditor.java
@@ -0,0 +1,407 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.table.efacet.common.editor;
+
+import java.util.EventObject;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.table.efacet.common.Activator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.part.EditorPart;
+
+//TODO : we should continue to develp this class in order it looks like to the abstract class of GMFDiagramEditor in Papyrus then move it in an upper plugin
+public abstract class AbstractPapyrusNestedEditor extends EditorPart implements IEditingDomainProvider {
+
+ protected final ServicesRegistry servicesRegistry;
+
+ private final CommandStackListener commandListener = new CommandStackListener() {
+
+ public void commandStackChanged(final EventObject event) {
+ Display.getCurrent().asyncExec(new Runnable() {
+
+ public void run() {
+ firePropertyChange(PROP_DIRTY);
+ }
+ });
+ }
+ };
+
+ public AbstractPapyrusNestedEditor(final ServicesRegistry registry) {
+ this.servicesRegistry = registry;
+ }
+
+ public final EditingDomain getEditingDomain() {
+ try {
+ return ServiceUtils.getInstance().getTransactionalEditingDomain(this.servicesRegistry);
+ } catch (final ServiceException e) {
+ Activator.log.error(e);
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ return true;
+ }
+
+ /**
+ * This sets up the editing domain for the model editor
+ */
+ protected void configureEditorEditingDomain() {
+ Assert.isNotNull(getEditingDomain());
+ getEditingDomain().getCommandStack().removeCommandStackListener(this.commandListener);
+ getEditingDomain().getCommandStack().addCommandStackListener(this.commandListener);
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ getEditingDomain().getCommandStack().removeCommandStackListener(this.commandListener);
+ }
+
+ // /**
+ // * The location of diagram icon in the plug-in
+ // */
+ // private static final String DIAG_IMG_PATH =
+ // "icons/obj16/Diagram_Class.gif";
+ //
+ // /**
+ // * The image descriptor of the diagram icon
+ // */
+ // private static final ImageDescriptor DIAG_IMG_DESC =
+ // UMLDiagramEditorPlugin.getBundledImageDescriptor(UmlClassDiagramForMultiEditor.DIAG_IMG_PATH);
+ //
+ //
+ // /**
+ // * @generated
+ // */
+ // public static final String ID = "org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorID"; //$NON-NLS-1$
+ //
+ // /**
+ // * @generated
+ // */
+ // public static final String CONTEXT_ID = "org.eclipse.papyrus.uml.diagram.clazz.ui.diagramContext"; //$NON-NLS-1$
+ //
+ // @Override
+ // public void doSave(final IProgressMonitor monitor) {
+ // // TODO Auto-generated method stub
+ //
+ // }
+ //
+ // @Override
+ // public void doSaveAs() {
+ // // TODO Auto-generated method stub
+ //
+ // }
+ //
+ // @Override
+ // public void init(final IEditorSite site, final IEditorInput input) throws
+ // PartInitException {
+ // // TODO Auto-generated method stub
+ //
+ // }
+ //
+ // @Override
+ // public boolean isDirty() {
+ // // TODO Auto-generated method stub
+ // return false;
+ // }
+ //
+ // @Override
+ // public boolean isSaveAsAllowed() {
+ // // TODO Auto-generated method stub
+ // return false;
+ // }
+ //
+ // @Override
+ // public void createPartControl(final Composite parent) {
+ // // TODO Auto-generated method stub
+ //
+ // }
+ //
+ // @Override
+ // public void setFocus() {
+ // // TODO Auto-generated method stub
+ //
+ // }
+ //
+ // /**
+ // * @generated
+ // */
+ // @Override
+ // protected PreferencesHint getPreferencesHint() {
+ // return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
+ // }
+ //
+ // /**
+ // * @generated
+ // */
+ // public void gotoMarker(final IMarker marker) {
+ // MarkerNavigationService.getInstance().gotoMarker(this, marker);
+ // }
+ //
+ // /**
+ // * @generated
+ // */
+ // @Override
+ // public boolean isSaveAsAllowed() {
+ // return true;
+ // }
+ //
+ // /**
+ // * @generated
+ // */
+ // @Override
+ // protected String getContextID() {
+ // return CONTEXT_ID;
+ // }
+ //
+ // /**
+ // * @generated
+ // */
+ // @Override
+ // public TransactionalEditingDomain getEditingDomain() {
+ // return editingDomain;
+ // }
+ //
+ // //------------------------//from UMLDiagramEditor (in class diagram
+ // plugin
+ // /**
+ // * @generated
+ // */
+ // @Override
+ // public void doSaveAs() {
+ // performSaveAs(new NullProgressMonitor());
+ // }
+ //
+ // //------------------------//from UMLDiagramEditor (in class diagram
+ // plugin
+ // /**
+ // * @generated
+ // */
+ // @Override
+ // protected void performSaveAs(final IProgressMonitor progressMonitor) {
+ // // Nothing
+ // }
+ //
+ // //------------------------//from UMLDiagramEditor (in class diagram
+ // plugin
+ // /**
+ // * @generated
+ // */
+ // @Override
+ // protected TransactionalEditingDomain createEditingDomain() {
+ // // Already configured
+ // return editingDomain;
+ // }
+ //
+ // //------------------------//from UMLDiagramEditor (in class diagram
+ // plugin
+ // /**
+ // * @generated
+ // */
+ // @Override
+ // protected void configureDiagramEditDomain() {
+ // super.configureDiagramEditDomain();
+ // getDiagramEditDomain().getDiagramCommandStack().addCommandStackListener(new
+ // CommandStackListener() {
+ //
+ // public void commandStackChanged(final EventObject event) {
+ // firePropertyChange(IEditorPart.PROP_DIRTY);
+ // }
+ // });
+ // }
+ //
+ // //------------------------//from UMLDiagramEditor (in class diagram
+ // plugin
+ // /**
+ // * @generated
+ // */
+ // @Override
+ // public void doSave(final IProgressMonitor progressMonitor) {
+ // // The saving of the resource is done by the CoreMultiDiagramEditor
+ // lastSavdeOperation = getOperationHistory().getUndoOperation(getUndoContext());
+ // }
+ //
+ // //------------------------//from UMLDiagramEditor (in class diagram
+ // plugin
+
+ //
+ // //---------fro mUMLGrmfDiagramEditor
+ // /**
+ // * The associated Diagram.
+ // */
+ // private Diagram diagram;
+ //
+ // //---------fro mUMLGrmfDiagramEditor
+ // /**
+ // * Object used to synchronize the name of the editor with the name of the
+ // * diagram.
+ // */
+ // private PartNameSynchronizer partNameSynchronizer;
+ //
+ // //---------fro mUMLGrmfDiagramEditor
+ // /**
+ // * service serviceRegistry of the backbone
+ // */
+ // private ServicesRegistry servicesRegistry;
+ //
+ // //---------fro mUMLGrmfDiagramEditor
+ // /**
+ // * Constructor.
+ // *
+ // * @param servicesRegistry
+ // * @param diagram
+ // * @throws ServiceException
+ // */
+ // public UmlGmfDiagramEditor(final ServicesRegistry servicesRegistry, final
+ // Diagram diagram) throws ServiceException {
+ // super(true);
+ // this.diagram = diagram;
+ // this.servicesRegistry = servicesRegistry;
+ // // Install synchronizer
+ // this.partNameSynchronizer = new PartNameSynchronizer(diagram);
+ //
+ // // Register this part to the ISaveAndDirtyService.
+ // // This will allows to be notified of saveAs events, and the isDirty
+ // // flag will be taken into
+ // // account.
+ // final ISaveAndDirtyService saveAndDirtyService =
+ // servicesRegistry.getService(ISaveAndDirtyService.class);
+ // saveAndDirtyService.registerIsaveablePart(this);
+ //
+ // // TODO: unregister when editor is disposed !
+ // }
+ //
+ // //---------fro mUMLGrmfDiagramEditor
+ // /**
+ // * Dispose services used in this part.
+ // *
+ // * @see
+ // org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor#dispose()
+ // *
+ // */
+ // @Override
+ // public void dispose() {
+ // super.dispose();
+ //
+ // ISaveAndDirtyService saveAndDirtyService;
+ // try {
+ // saveAndDirtyService =
+ // this.servicesRegistry.getService(ISaveAndDirtyService.class);
+ // saveAndDirtyService.removeIsaveablePart(this);
+ //
+ // } catch (final ServiceException e) {
+ // // the service can't be found. Maybe it is already disposed.
+ // // Do nothing
+ // }
+ //
+ // }
+ //
+ // //---------fro mUMLGrmfDiagramEditor
+ // /**
+ // *
+ // * @return the backbone service serviceRegistry. it cannot return null.
+ // */
+ // public ServicesRegistry getServicesRegistry() {
+ // return this.servicesRegistry;
+ // }
+ //
+ // public class SynchronizableGmfDiagramEditor extends DiagramDocumentEditor
+ // implements IRevealSemanticElement {
+ //
+ // public SynchronizableGmfDiagramEditor(final boolean hasFlyoutPalette) {
+ // super(hasFlyoutPalette);
+ // }
+ //
+ //
+ // /**
+ // * reveal all editpart that represent an element in the given list.
+ // *
+ // * @see
+ // org.eclipse.papyrus.infra.core.ui.IRevealSemanticElement#revealSemanticElement(java.util.List)
+ // *
+ // */
+ // public void revealSemanticElement(final List<?> elementList) {
+ // //create an instance that can get semantic element from gmf
+ // final SemanticFromGMFElement semanticFromGMFElement = new
+ // SemanticFromGMFElement();
+ //
+ // // get the graphical viewer
+ // final GraphicalViewer graphicalViewer = getGraphicalViewer();
+ // if(graphicalViewer != null) {
+ //
+ // //look for among all edit part if the semantic is contained in the list
+ // final Iterator<?> iter =
+ // graphicalViewer.getEditPartRegistry().values().iterator();
+ // IGraphicalEditPart researchedEditPart = null;
+ // while(iter.hasNext() && researchedEditPart == null) {
+ // final Object currentEditPart = iter.next();
+ // //look for only among IPrimary editpart to avoid compartment and labels
+ // of links
+ // if(currentEditPart instanceof IPrimaryEditPart) {
+ // if(elementList.contains(semanticFromGMFElement.getSemanticElement(currentEditPart)))
+ // {
+ // researchedEditPart = ((IGraphicalEditPart)currentEditPart);
+ // }
+ // }
+ //
+ // }
+ // //an editpart has been found so put selection on it.
+ // if(researchedEditPart != null) {
+ // graphicalViewer.select(researchedEditPart);
+ // }
+ // }
+ // }
+ //
+ // /**
+ // * Configures my diagram edit domain with its command stack.
+ // * This method has been completely overridden in order to use a proxy
+ // stack.
+ // */
+ // @Override
+ // protected void configureDiagramEditDomain() {
+ //
+ // final DefaultEditDomain editDomain = getEditDomain();
+ //
+ // if(editDomain != null) {
+ // final CommandStack stack = editDomain.getCommandStack();
+ // if(stack != null) {
+ // // dispose the old stack
+ // stack.dispose();
+ // }
+ //
+ // // create and assign the new stack
+ // final CheckedDiagramCommandStack diagramStack = new
+ // CheckedDiagramCommandStack(getDiagramEditDomain());
+ //
+ // editDomain.setCommandStack(diagramStack);
+ // }
+ //
+ // final DiagramEditDomain diagEditDomain =
+ // (DiagramEditDomain)getDiagramEditDomain();
+ // diagEditDomain.setActionManager(createActionManager());
+ // }
+ // }
+ //
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/AbstractSynchronizedTableEditor.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/AbstractSynchronizedTableEditor.java
new file mode 100644
index 00000000000..db69e8a6839
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/AbstractSynchronizedTableEditor.java
@@ -0,0 +1,110 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.common.editor;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.TriggerListener;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.table.efacet.common.input.PapyrusTableEditorInput;
+import org.eclipse.papyrus.infra.table.efacet.common.listener.FillingListener;
+import org.eclipse.papyrus.infra.table.efacet.common.listener.MoveTableLineListener;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.contexts.IContextService;
+
+public abstract class AbstractSynchronizedTableEditor extends AbstractTableEditor {
+
+
+
+ /** listener on the model for synchronized table */
+ private TriggerListener fillingListener;
+
+ /** to listen moving lines in the table */
+ private TriggerListener moveLineListener;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param servicesRegistry
+ * the service serviceRegistry
+ * @param rawModel
+ * the raw model
+ */
+ public AbstractSynchronizedTableEditor(final ServicesRegistry servicesRegistry, final PapyrusTable rawModel) {
+ super(servicesRegistry, rawModel);
+ }
+
+
+
+ /**
+ *
+ * @see org.eclipse.emf.facet.widgets.nattable.workbench.editor.NatTableEditor#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
+ *
+ * @param site
+ * @param input
+ * @throws PartInitException
+ */
+ @Override
+ public void init(final IEditorSite site, final IEditorInput input) throws PartInitException {
+ final PapyrusTableEditorInput tableEditorInput = new PapyrusTableEditorInput(this.rawModel, getEditingDomain());
+ super.init(site, tableEditorInput);
+ }
+
+
+ /**
+ * add listeners on the context of the table and on the table itself
+ */
+ @Override
+ protected void configureEditorEditingDomain() {
+ super.configureEditorEditingDomain();
+ final EditingDomain editingDomain = getEditingDomain();
+ Assert.isTrue(editingDomain instanceof TransactionalEditingDomain);
+
+ this.fillingListener = new FillingListener(this.rawModel);
+ ((TransactionalEditingDomain)editingDomain).addResourceSetListener(this.fillingListener);
+
+ this.moveLineListener = new MoveTableLineListener(this.rawModel);
+ ((TransactionalEditingDomain)editingDomain).addResourceSetListener(this.moveLineListener);
+ }
+
+ @Override
+ public void createPartControl(final Composite parent) {
+ final IContextService contextService = (IContextService)getSite().getService(IContextService.class);
+ //FIXME : before Eclipse Juno, this line was not necessary
+ //see bug 367816 and bug 382218
+ contextService.activateContext("org.eclipse.papyrus.infra.table.efacet.common.context"); //$NON-NLS-1$
+ super.createPartControl(parent);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.table.common.internal.NatTableEditor#dispose()
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void dispose() {
+ ((TransactionalEditingDomain)getEditingDomain()).removeResourceSetListener(this.fillingListener);
+ ((TransactionalEditingDomain)getEditingDomain()).removeResourceSetListener(this.moveLineListener);
+ super.dispose();
+ }
+
+
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/AbstractTableEditor.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/AbstractTableEditor.java
new file mode 100644
index 00000000000..24c5fcf3728
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/AbstractTableEditor.java
@@ -0,0 +1,506 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Duplicated code from EMF-Facet
+ */
+
+package org.eclipse.papyrus.infra.table.efacet.common.editor;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.command.BasicCommandStack;
+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.domain.IEditingDomainProvider;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Table;
+import org.eclipse.emf.facet.widgets.table.ui.internal.exported.ITableWidget;
+import org.eclipse.emf.facet.widgets.table.ui.internal.exported.ITableWidgetFactory;
+import org.eclipse.emf.facet.widgets.table.ui.internal.exported.ITableWidgetInternal;
+import org.eclipse.emf.facet.widgets.table.ui.internal.exported.ITableWidgetProvider;
+import org.eclipse.emf.facet.widgets.table.ui.internal.exported.ITableWidgetView;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.table.efacet.common.Activator;
+import org.eclipse.papyrus.infra.table.efacet.common.input.PapyrusTableEditorInput;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+
+
+/**
+ * Adapted code from EMF-Facet
+ *
+ *
+ */
+public class AbstractTableEditor extends AbstractPapyrusNestedEditor implements ISelectionProvider {
+
+ /** listener on the selection changes */
+ private final ISelectionChangedListener localSelectionListener = new SelectionChangeListener();
+
+ /** the list of the registered selection listeners */
+ private final List<ISelectionChangedListener> registeredSelectionListener = new ArrayList<ISelectionChangedListener>();
+
+ /** the id for the menu of the editor */
+ private final static String ID = "org.eclipse.papyrus.infra.table.efacet.common.editor";
+
+ protected ITableWidget natTableWidget;
+
+ /** the table instance */
+ protected PapyrusTable rawModel;
+
+
+
+ public AbstractTableEditor(final ServicesRegistry servicesRegistry, final PapyrusTable rawModel) {
+ super(servicesRegistry);
+ this.rawModel = rawModel;
+ new PartNameSynchronizer(rawModel);
+ }
+
+ @SuppressWarnings("rawtypes")
+ // We cannot change the method signature because of the override
+ @Override
+ public Object getAdapter(final Class adapter) {
+ if(adapter == ITableWidgetProvider.class) {
+ return new ITableWidgetProvider() {
+
+ public ITableWidget getTableWidget() {
+ return AbstractTableEditor.this.natTableWidget;
+ }
+ };
+ }
+ if(adapter == PapyrusTable.class) {
+ return this.natTableWidget.getTable().eContainer();
+ } else if(adapter == Table.class) {
+ return this.natTableWidget.getTable();
+ }
+ return null;
+ }
+
+ @Override
+ public void init(final IEditorSite site, final IEditorInput input) throws PartInitException {
+ if(input instanceof PapyrusTableEditorInput) {
+ setSite(site);
+ setInput(input);
+ setPartName(this.rawModel.getName());
+ configureEditorEditingDomain();
+ } else {
+ throw new PartInitException("Input should be of type TableEditorInput"); //$NON-NLS-1$
+ }
+ }
+
+
+
+ /**
+ *
+ * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+ *
+ * @param parent
+ */
+ @Override
+ public void createPartControl(final Composite parent) {
+
+ final Composite editorComposite = createCompositeCompositeWthTableBorder(parent);
+
+ // the composite owning the table
+ final Composite tableComposite = new Composite(editorComposite, SWT.NONE);
+ final GridLayout tableCompositeGridLayout = new GridLayout(1, true);
+ tableComposite.setLayout(tableCompositeGridLayout);
+
+ final GridData compositeTableGridLayout = new GridData();
+ compositeTableGridLayout.grabExcessHorizontalSpace = true;
+ compositeTableGridLayout.grabExcessVerticalSpace = true;
+ compositeTableGridLayout.horizontalAlignment = SWT.FILL;
+ compositeTableGridLayout.verticalAlignment = SWT.FILL;
+ tableComposite.setLayoutData(compositeTableGridLayout);
+ final FilteredMenuManager menuMgr = new FilteredMenuManager("#PopUp", AbstractTableEditor.ID);
+ this.natTableWidget = createNattableWidget(tableComposite, this, this.rawModel.getTable(), menuMgr);
+ this.natTableWidget.addSelectionChangedListener(new SelectionChangeListener());
+ getSite().setSelectionProvider(this);
+ getSite().registerContextMenu(menuMgr, this.natTableWidget);
+ }
+
+ /**
+ *
+ * @param tableComposite
+ * the composite
+ * @param domainProvider
+ * the editing domain provider
+ * @param table
+ * the table
+ * @param menuMgr2
+ * the menu manager for the widget
+ * @return
+ */
+ private ITableWidget createNattableWidget(final Composite tableComposite, final IEditingDomainProvider domainProvider, final Table table, final MenuManager menuMgr) {
+ final ITableWidget widget = ITableWidgetFactory.INSTANCE.createTableWidget(tableComposite, domainProvider, table, menuMgr);
+ final GridData tableGridData = new GridData();
+ tableGridData.grabExcessHorizontalSpace = true;
+ tableGridData.grabExcessVerticalSpace = true;
+ tableGridData.horizontalAlignment = SWT.FILL;
+ tableGridData.verticalAlignment = SWT.FILL;
+ widget.getComposite().setLayoutData(tableGridData);
+ return widget;
+ }
+
+ private Composite createCompositeCompositeWthTableBorder(final Composite parent) {
+ final Composite editorComposite = new Composite(parent, SWT.BORDER);
+ final GridLayout editorGridLayout = new GridLayout(1, true);
+ editorGridLayout.marginHeight = 0;
+ editorGridLayout.marginWidth = 0;
+
+ final GridData data = new GridData();
+ data.grabExcessHorizontalSpace = true;
+ data.horizontalAlignment = SWT.FILL;
+ editorComposite.setLayoutData(data);
+ editorComposite.setLayout(editorGridLayout);
+ return editorComposite;
+ }
+
+ @Override
+ public void setFocus() {
+ this.natTableWidget.getComposite().setFocus();
+ }
+
+ @Override
+ public boolean isDirty() {
+ return ((BasicCommandStack)getEditingDomain().getCommandStack()).isSaveNeeded();
+ }
+
+ @Override
+ public void doSave(final IProgressMonitor monitor) {
+ //nothing to do here, the save is done by the CoreMultiDiagramEditor
+ }
+
+ @Override
+ public void doSaveAs() {
+ //nothing to do here, the save is done by the CoreMultiDiagramEditor
+ }
+
+ public void setSelection(final ISelection selection) {
+ this.natTableWidget.setSelection(selection);
+ }
+
+
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ this.natTableWidget.removeSelectionChangedListener(this.localSelectionListener);
+ this.registeredSelectionListener.clear();
+ }
+
+
+ /**
+ * Warning, we should avoid to use this method.
+ * It will be better to ask to emffacet to open their API
+ *
+ * @return
+ * the grid selection
+ */
+ //currently never used
+ public List<Object> getGridSelection() {
+ final String errorMessage = "We are using java reflect API to get the Grid Selection of the table";
+ Activator.log.warn(errorMessage);
+ final Class<?> cl = this.natTableWidget.getClass();
+ ITableWidgetView view = null;
+ ITableWidgetInternal nattableWidget = null;
+ try {
+ Field field = cl.getDeclaredField("nattableWidget");
+ field.setAccessible(true);
+ nattableWidget = (ITableWidgetInternal)field.get(this.natTableWidget);
+ field = nattableWidget.getClass().getDeclaredField("view");
+ field.setAccessible(true);
+ view = (ITableWidgetView)field.get(nattableWidget);
+ } catch (final SecurityException e) {
+ Activator.log.error(errorMessage, e);
+ } catch (final NoSuchFieldException e) {
+ Activator.log.error(errorMessage, e);
+ } catch (final IllegalArgumentException e) {
+ Activator.log.error(errorMessage, e);
+ } catch (final IllegalAccessException e) {
+ Activator.log.error(errorMessage, e);
+ }
+ return view.getGridSelection();
+ }
+
+ public ISelection getSelection() {
+
+ // StructuredSelection selection = null;
+ // final List<EObject> selectedEObject = ((org.eclipse.emf.facet.widgets.table.ui.ITableWidget)this.natTableWidget).getSelectedRowEObjects();
+ // final ITableWidgetView view = getTableWidgetView();
+ //
+ // final List<Object> gridSelection = view.getGridSelection();
+ // final List<Column> selectedColumn = new ArrayList<Column>();
+ // final List<Row> selectedRow = new ArrayList<Row>();
+ // final List<IGridElement> grid = new ArrayList<IGridElement>();
+ // if(gridSelection.isEmpty()) {
+ // return new StructuredSelection(this.tableEditorInput.getPapyrusTable());
+ // }
+ //
+ // for(final Object current : gridSelection) {
+ // if(current instanceof Column) {
+ // selectedColumn.add((Column)current);
+ // } else if(current instanceof IGridElement) {
+ // grid.add((IGridElement)current);
+ // } else if(current instanceof Row) {
+ // selectedRow.add((Row)current);
+ // }
+ // // org.eclipse.emf.facet.widgets.table.ui.nattable.internal.nattable.dataprovider.GridElement
+ // int i = 0;
+ // i++;
+ // }
+ //
+ // //we ignore columns!
+ // if(!selectedRow.isEmpty()) {
+ // selection = new StructuredSelection(((org.eclipse.emf.facet.widgets.table.ui.ITableWidget)this.natTableWidget).getSelectedRowEObjects());
+ // } else if(!gridSelection.isEmpty()) {
+ // final List<Object> eobject = new ArrayList<Object>();
+ // final IFacetManager facetManager = IFacetManagerFactory.DEFAULT.getOrCreateFacetManager(this.tableEditorInput.getPapyrusTable().eResource().getResourceSet());
+ // for(final IGridElement gridElement : grid) {
+ //
+ // try {
+ // eobject.add(TableWidgetUtils.getValueOf(gridElement, facetManager));
+ // } catch (final FacetManagerException e) {
+ // // TODO Auto-generated catch block
+ // e.printStackTrace();
+ // }
+ // int i = 0;
+ // i++;
+ // }
+ // return new StructuredSelection(eobject);
+ // }
+ //
+ //
+ //
+ // if(!selectedEObject.isEmpty()) {
+ // //return
+ // selection = new StructuredSelection(selectedEObject);
+ // } else {
+ // // final ISelection tableSelection = this.natTableWidget.getSelection();
+ // // if(tableSelection.isEmpty()) {
+ // selection = new StructuredSelection(this.tableEditorInput.getPapyrusTable());
+ // // }
+ // }
+ StructuredSelection selection = null;
+ selection = (StructuredSelection)this.natTableWidget.getSelection();
+ if(selection.isEmpty()) {
+ selection = new StructuredSelection(this.rawModel);
+ }
+ return selection;
+ }
+
+ public void addSelectionChangedListener(final ISelectionChangedListener listener) {
+ this.registeredSelectionListener.add(listener);
+ }
+
+ public void removeSelectionChangedListener(final ISelectionChangedListener listener) {
+ this.registeredSelectionListener.remove(listener);
+ }
+
+ /**
+ *
+ * This listener dispatches the selection change events to the registered listeners
+ *
+ */
+ private class SelectionChangeListener implements ISelectionChangedListener {
+
+ /**
+ *
+ * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+ * s
+ * @param event
+ */
+ public void selectionChanged(final SelectionChangedEvent event) {
+ ISelection selection = event.getSelection();
+ if(selection.isEmpty()) {
+ selection = new StructuredSelection(AbstractTableEditor.this.rawModel);
+ }
+ for(final ISelectionChangedListener current : AbstractTableEditor.this.registeredSelectionListener) {
+ current.selectionChanged(new SelectionChangedEvent(AbstractTableEditor.this, selection));
+ }
+ }
+ }
+
+ /**
+ *
+ * This menu manager allows to filter the contribution to the menu of the table
+ * FIXME : try to do that with capabilities and activities
+ *
+ */
+ private class FilteredMenuManager extends MenuManager {
+
+
+ /** the qualified name of forbidden contribution */
+ private List<String> forbiddenContributions = null;
+
+ /** the pattern of authorized contribution */
+ private List<String> authorizedPattern = new ArrayList<String>();
+
+ public FilteredMenuManager(final String text, final String id) {
+ super(text, id);
+ this.forbiddenContributions = new ArrayList<String>();
+ this.forbiddenContributions.add("org.eclipse.emf.facet.widgets.nattable.examples.ecore.internal.commands.openEclorTabularEditor");
+ this.forbiddenContributions.add("org.eclipse.emf.facet.widgets.nattable.workbench.action4");
+ this.forbiddenContributions.add("org.eclipse.emf.facet.widgets.nattable.workbench.action3");
+ this.forbiddenContributions.add("org.eclipse.emf.facet.widgets.table.ui.workbench.command1");
+ this.forbiddenContributions.add("org.eclipse.emf.facet.widgets.table.ui.workbench.command2");
+
+ this.authorizedPattern = new ArrayList<String>();
+ this.authorizedPattern.add("papyrus");
+ this.authorizedPattern.add("table");
+ this.authorizedPattern.add("org.eclipse.ui.edit.delete");
+ this.authorizedPattern.add("org.eclipse.ui.edit.copy");
+ this.authorizedPattern.add("org.eclipse.ui.edit.selectAll");
+ }
+
+
+
+ /**
+ * We filter the contribution to the table menu
+ *
+ * @see org.eclipse.jface.action.MenuManager#doItemFill(org.eclipse.jface.action.IContributionItem, int)
+ *
+ * @param ci
+ * @param index
+ */
+ @Override
+ protected void doItemFill(final IContributionItem ci, final int index) {
+ if(isAllowedInTableMenu(ci)) {
+ super.doItemFill(ci, index);
+ }
+ }
+
+ private boolean isAllowedInTableMenu(final IContributionItem ci) {
+ final String contributionId = ci.getId();
+ boolean autorized = true;
+ for(final String current : this.forbiddenContributions) {
+ if(contributionId.contains(current)) {
+ autorized = false;
+ }
+ }
+ if(autorized) {
+ for(final String current : this.authorizedPattern) {
+ if(contributionId.contains(current)) {
+ autorized = true;
+ }
+ }
+ }
+ return autorized;
+ }
+
+ }
+
+ /**
+ * A class taking in charge the synchronization of the partName and the table name.
+ * When table name change, the other is automatically updated.
+ *
+ * @author vincent lorenzo
+ * adapted class from UmlGmfDiagramEditor
+ */
+ public class PartNameSynchronizer {
+
+ /** the papyrus table */
+ private PapyrusTable papyrusTable;
+
+ /**
+ * Listener on diagram name change.
+ */
+ private final Adapter tableNameListener = new Adapter() {
+
+ /**
+ *
+ * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ public void notifyChanged(final Notification notification) {
+ if(notification.getFeatureID(PapyrusTable.class) == PapyrustablePackage.PAPYRUS_TABLE__NAME && notification.getNotifier() == PartNameSynchronizer.this.papyrusTable) {
+ setPartName(PartNameSynchronizer.this.papyrusTable.getName());
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.common.notify.Adapter#getTarget()
+ *
+ * @return
+ */
+ public Notifier getTarget() {
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.common.notify.Adapter#setTarget(org.eclipse.emf.common.notify.Notifier)
+ *
+ * @param newTarget
+ */
+ public void setTarget(final Notifier newTarget) {
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.common.notify.Adapter#isAdapterForType(java.lang.Object)
+ *
+ * @param type
+ * @return
+ */
+ public boolean isAdapterForType(final Object type) {
+ return false;
+ }
+
+ };
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param diagram
+ */
+ public PartNameSynchronizer(final PapyrusTable papyrusTable) {
+ setTable(papyrusTable);
+ }
+
+ /**
+ * Change the associated diagram.
+ *
+ * @param papyrusTable
+ */
+ public void setTable(final PapyrusTable papyrusTable) {
+ // Remove from old table, if any
+ if(this.papyrusTable != null) {
+ papyrusTable.eAdapters().remove(this.tableNameListener);
+ }
+ // Set new table
+ this.papyrusTable = papyrusTable;
+ // Set editor name
+ setPartName(papyrusTable.getName());
+ // Listen to name change
+ papyrusTable.eAdapters().add(this.tableNameListener);
+ }
+ }
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/EditorNameInitializer.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/EditorNameInitializer.java
new file mode 100644
index 00000000000..14e4fea8582
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/editor/EditorNameInitializer.java
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.table.efacet.common.editor;
+
+import java.util.Collection;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
+
+/**
+ *
+ * This class provides useful method to get an unused name for a new editor
+ *
+ */
+//TODO move it in an upper plugin
+public class EditorNameInitializer {
+
+ private EditorNameInitializer() {
+ //to prenvent instanciation
+ }
+
+ /**
+ * This method returns the owner for the feature called "name". In some specific case (like PapyrusTable) the name is not owned by the eobject
+ * which provides the context of the editor!
+ *
+ * @param eobject
+ * an eobject
+ * @return
+ * the eobject which contains a feature called "name" or null if not found
+ */
+ private static final EObject getNameFeatureOwner(final EObject eobject) {
+ EObject owner = eobject;
+ while(owner.eContainer() != null) {
+ EStructuralFeature nameFeature = ((EObject)eobject).eClass().getEStructuralFeature("name");
+ if(nameFeature == null) {
+ owner = owner.eContainer();
+ } else {
+ return owner;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * This method returns the feature called "name". In some specific case (like PapyrusTable) the name is not owned by the eobject
+ * which provides the context of the editor!
+ *
+ * @param eobject
+ * an eobject
+ * @return
+ * the name feature or <code>null</code> if not found
+ */
+ private static final EStructuralFeature getNameFeature(final EObject eobject) {
+ EObject owner = eobject;
+ while(owner.eContainer() != null) {
+ EStructuralFeature nameFeature = ((EObject)eobject).eClass().getEStructuralFeature("name");
+ if(nameFeature == null) {
+ owner = owner.eContainer();
+ } else {
+ return nameFeature;
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param editorModelEClass
+ * the eclass of the model of the editor
+ * @param wantedNameWithoutIndex
+ * the wantedname for the new editor
+ * @param context
+ * the context of the editor
+ * @return
+ * the name for this editor
+ */
+ public static final String getNameWithIncrement(final EClass editorModelEClass, final String wantedNameWithoutIndex, final EObject context) {
+ //a set of the existing index for the wantedName
+ final SortedSet<Integer> existingIndex = new TreeSet<Integer>();
+ final ECrossReferenceAdapter crossRef = ECrossReferenceAdapter.getCrossReferenceAdapter(context);
+ final Collection<Setting> crossReference = crossRef.getNonNavigableInverseReferences(context, true);
+ for(Setting set : crossReference) {
+ final EObject eobject = set.getEObject();
+ if(eobject.eClass() == editorModelEClass) {
+ final EStructuralFeature nameFeature = getNameFeature(eobject);
+ if(nameFeature != null) {
+ final EObject featureOwner = getNameFeatureOwner(eobject);
+ Object currentName = featureOwner.eGet(nameFeature);
+ if(currentName instanceof String) {
+ String aName = (String)currentName;
+ if(aName.contains(wantedNameWithoutIndex)) {
+ String lastChar = aName.substring(aName.length() - 1, aName.length());
+ try {
+ Integer value = Integer.parseInt(lastChar);
+ existingIndex.add(value);
+ } catch (Exception e) {
+ //nothing to do
+ }
+ }
+ }
+ }
+ }
+ }
+ int index = 0;
+ if(!existingIndex.isEmpty()) {
+ index = existingIndex.last().intValue() + 1;
+ }
+ return wantedNameWithoutIndex + String.valueOf(index);
+ }
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/factory/AbstractTableEditorFactory.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/factory/AbstractTableEditorFactory.java
new file mode 100644
index 00000000000..19f87d581f4
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/factory/AbstractTableEditorFactory.java
@@ -0,0 +1,197 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.common.factory;
+
+import java.lang.reflect.Constructor;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.editor.BackboneException;
+import org.eclipse.papyrus.infra.core.extension.diagrameditor.AbstractEditorFactory;
+import org.eclipse.papyrus.infra.core.multidiagram.actionbarcontributor.ActionBarContributorRegistry;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.table.efacet.common.Activator;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorActionBarContributor;
+
+public class AbstractTableEditorFactory extends AbstractEditorFactory {
+
+ public AbstractTableEditorFactory(final Class<?> diagramClass, final String expectedType) {
+ super(diagramClass, expectedType);
+ }
+
+ /**
+ * Create the IPageModel that is used by the SashWindows to manage the
+ * editor.
+ *
+ * @see org.eclipse.papyrus.infra.core.editorsfactory.IEditorFactory#createIPageModel(java.lang.Object)
+ *
+ * @param pageIdentifier
+ * The model pushed in the sashmodel by the creation command
+ * @return A model implementing the IPageModel
+ */
+ public IPageModel createIPageModel(final Object pageIdentifier) {
+ return new TableEditorModel(pageIdentifier, getServiceRegistry());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.editorsfactory.IEditorFactory#isPageModelFactoryFor(java.lang.Object)
+ *
+ * @param pageIdentifier
+ * @return
+ */
+ public boolean isPageModelFactoryFor(final Object pageIdentifier) {
+ if(pageIdentifier instanceof PapyrusTable) {
+ return getExpectedType().equals(((PapyrusTable)pageIdentifier).getType());
+ }
+ return false;
+ }
+
+ /**
+ * IEditorModel used internally by the SashContainer. This model know how to
+ * handle IEditor creation.
+ *
+ * @author cedric dumoulin
+ *
+ */
+ class TableEditorModel implements IEditorModel {
+
+ /**
+ * The servicesRegistry provided at creation.
+ */
+ private final ServicesRegistry servicesRegistry;
+
+ /**
+ * The created editor.
+ */
+ private IEditorPart editor;
+
+ /**
+ * The raw model stored in the SashProvider.
+ */
+ private final PapyrusTable rawModel;
+
+ /**
+ *
+ * Constructor.
+ */
+ public TableEditorModel(final Object pageIdentifier, final ServicesRegistry servicesRegistry) {
+ this.rawModel = (PapyrusTable)pageIdentifier;
+ this.servicesRegistry = servicesRegistry;
+ }
+
+ /**
+ * Create the IEditor for the diagram.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel#createIEditorPart()
+ * @return
+ * @throws PartInitException
+ *
+ */
+ public IEditorPart createIEditorPart() throws PartInitException {
+ try {
+
+ final Constructor<?> c = getDiagramClass().getConstructor(ServicesRegistry.class, PapyrusTable.class);
+ final IEditorPart newEditor = (IEditorPart)c.newInstance(this.servicesRegistry, this.rawModel);
+ this.editor = newEditor;
+ return this.editor;
+
+ } catch (final Exception e) {
+ // Lets propagate. This is an implementation problem that should
+ // be solved by
+ // programmer.
+ throw new PartInitException("Can't create TableEditor", e); //$NON-NLS-1$
+ }
+
+ }
+
+ /**
+ * Get the action bar requested by the Editor.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel#getActionBarContributor()
+ * @return
+ *
+ */
+ public EditorActionBarContributor getActionBarContributor() {
+
+ final String actionBarId = AbstractTableEditorFactory.this.editorDescriptor.getActionBarContributorId();
+
+ // Do nothing if no EditorActionBarContributor is specify.
+ if(actionBarId == null || actionBarId.length() == 0) {
+ return null;
+ }
+
+ // Try to get it.
+
+ // Get ServiceRegistry
+ // ServicesRegistry serviceRegistry = getServicesRegistry();
+ ActionBarContributorRegistry registry;
+ try {
+ registry = this.servicesRegistry.getService(ActionBarContributorRegistry.class);
+ } catch (final ServiceException e) {
+ Activator.log.error(e);
+ return null;
+ }
+
+ try {
+ return registry.getActionBarContributor(actionBarId);
+ } catch (final BackboneException e) {
+ Activator.log.error(e);
+ return null;
+ }
+ }
+
+ /**
+ * Get the underlying RawModel. Return the Diagram.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel#getRawModel()
+ * @return
+ *
+ */
+ public Object getRawModel() {
+ return this.rawModel;
+ }
+
+ /**
+ * Get the icon to be shown by Tabs
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel#getTabIcon()
+ * @return
+ *
+ */
+ public Image getTabIcon() {
+ final ImageDescriptor imageDescriptor = getEditorDescriptor().getIcon();
+ if(imageDescriptor == null) {
+ return null;
+ }
+
+ return imageDescriptor.createImage();
+ }
+
+ /**
+ * Get the title of the Diagram.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel#getTabTitle()
+ * @return
+ *
+ */
+ public String getTabTitle() {
+ return this.rawModel.getName();
+ }
+ }
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/factory/PapyrusCommandFactory.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/factory/PapyrusCommandFactory.java
new file mode 100644
index 00000000000..971cf6c1dcb
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/factory/PapyrusCommandFactory.java
@@ -0,0 +1,303 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.table.efacet.common.factory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.facet.infra.browser.custom.AttributeView;
+import org.eclipse.emf.facet.infra.browser.custom.CustomViewFeature;
+import org.eclipse.emf.facet.infra.browser.custom.MetamodelView;
+import org.eclipse.emf.facet.infra.browser.custom.ReferenceView;
+import org.eclipse.emf.facet.infra.browser.custom.StaticFeatureValue;
+import org.eclipse.emf.facet.infra.browser.custom.TypeView;
+import org.eclipse.emf.facet.infra.facet.Facet;
+import org.eclipse.emf.facet.widgets.celleditors.internal.DefaultCommandFactory;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.Column;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.Row;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.TableInstance;
+import org.eclipse.emf.facet.widgets.nattable.internal.painter.Customization;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.table.efacet.common.Activator;
+
+/**
+ *
+ * This factory is used by the Papyrus Table when the editing domain is an instanceof TransactionalEditingDomain
+ *
+ */
+//TODO we should write a switch for the command factory (one for old tables and another one for new tabels)
+@SuppressWarnings("restriction")
+public class PapyrusCommandFactory extends DefaultCommandFactory {
+
+ /**
+ *
+ * @see org.eclipse.emf.facet.widgets.celleditors.internal.DefaultCommandFactory#handles(org.eclipse.emf.edit.domain.EditingDomain)
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean handles(final EditingDomain editingDomain) {
+ return editingDomain instanceof TransactionalEditingDomain;
+ }
+
+ /**
+ *
+ * @param owner
+ * the owner object
+ * @param feature
+ * the feature to edit
+ * @return <code>true</code> if object is an {@link EObject} and feature a {@link EStructuralFeature}
+ */
+ protected boolean testArgs(final Object owner, final Object feature) {
+ if(feature != null) {
+ if(feature instanceof EStructuralFeature) {
+ /*
+ * The ElementEditService can be used for UML Element and for view and for... others things,
+ * but it doesn't work correctly with the nattable widget elements
+ */
+ if(isEMFFacetElement(owner)) {
+ return false;
+ } else if(owner instanceof EObject) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * The ElementEditService can be used for UML Element and for view and for... others things, but it doesn't work correctly with the nattable
+ * widget
+ * elements
+ *
+ * @param owner
+ * an object
+ * @return
+ * <code>true</code> if the object is an EMF-Facet object
+ */
+ private boolean isEMFFacetElement(final Object owner) {
+ if(owner instanceof TableInstance) {
+ return true;
+ } else if(owner instanceof MetamodelView) {
+ return true;
+ } else if(owner instanceof Row) {
+ return true;
+ } else if(owner instanceof Column) {
+ return true;
+ } else if(owner instanceof Facet) {
+ return true;
+ } else if(owner instanceof Customization) {
+ return true;
+ } else if(owner instanceof TypeView) {
+ return true;
+ } else if(owner instanceof ReferenceView) {
+ return true;
+ } else if(owner instanceof AttributeView) {
+ return true;
+ } else if(owner instanceof CustomViewFeature) {
+ return true;
+ } else if(owner instanceof StaticFeatureValue) {
+ return true;
+ }
+ //we add this test,because, it is possible that we forget some emf-facet elements
+ String className = owner.getClass().getCanonicalName();
+ if(className.contains("org.eclipse.emf.facet")) { //$NON-NLS-1$
+ String message = "the type " + className + " should be included in the test"; //$NON-NLS-1$ //$NON-NLS-2$
+ Activator.getDefault().log.info(message);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.facet.widgets.celleditors.internal.DefaultCommandFactory#createAddCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * java.lang.Object, java.lang.Object, java.lang.Object)
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public Command createAddCommand(final EditingDomain editingDomain, final Object owner, final Object feature, final Object value) {
+ //the ElementEditService doesn't work correctly with nattable elements, so we test the edited element
+ if(isEMFFacetElement(owner)) {
+ return super.createAddCommand(editingDomain, owner, feature, value);
+ }
+ IElementEditService elementEditService = ElementEditServiceUtils.getCommandProvider(owner);
+ if(testArgs(owner, feature) && elementEditService != null) {
+ EObject current = (EObject)owner;
+ Object values = current.eGet((EStructuralFeature)feature);
+ if(values instanceof List<?>) {
+ ArrayList<Object> newList = new ArrayList<Object>();
+ newList.addAll((List<?>)values);
+ newList.add(value);
+ SetRequest request = new SetRequest((TransactionalEditingDomain)editingDomain, current, (EStructuralFeature)feature, newList);
+ ICommand command = elementEditService.getEditCommand(request);
+ if(command.canExecute()) {
+ return new GMFtoEMFCommandWrapper(command);
+ }
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.facet.widgets.celleditors.internal.DefaultCommandFactory#createDeleteCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * java.lang.Object)
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public Command createDeleteCommand(final EditingDomain editingDomain, final Object elementToDestroy) {
+ //the ElementEditService doesn't work correctly with nattable elements, so we test the edited element
+ if(isEMFFacetElement(elementToDestroy)) {
+ return super.createDeleteCommand(editingDomain, elementToDestroy);
+ }
+ IElementEditService elementEditService = ElementEditServiceUtils.getCommandProvider(elementToDestroy);
+ if(testArgs(elementToDestroy, null) && elementEditService != null) {
+ DestroyElementRequest request = new DestroyElementRequest((TransactionalEditingDomain)editingDomain, (EObject)elementToDestroy, false);
+ ICommand command = elementEditService.getEditCommand(request);
+ if(command.canExecute()) {
+ return new GMFtoEMFCommandWrapper(command);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.facet.widgets.celleditors.internal.DefaultCommandFactory#createMoveCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * java.lang.Object, java.lang.Object, java.lang.Object, int)
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public Command createMoveCommand(final EditingDomain editingDomain, final Object owner, final Object feature, final Object value, final int index) {
+ //the ElementEditService doesn't work correctly with nattable elements, so we test the edited element
+ if(isEMFFacetElement(owner)) {
+ return super.createMoveCommand(editingDomain, owner, feature, value, index);
+ }
+
+ IElementEditService elementEditService = ElementEditServiceUtils.getCommandProvider(owner);
+ if(testArgs(owner, feature) && elementEditService != null) {
+ EObject current = (EObject)owner;
+ Object values = current.eGet((EStructuralFeature)feature);
+ if(values instanceof List<?>) {
+ ArrayList<Object> newList = new ArrayList<Object>();
+ newList.addAll((List<?>)values);
+ int currentIndex = ((List<?>)values).indexOf(value);
+ newList.remove(currentIndex);
+ newList.add(index, value);
+ SetRequest request = new SetRequest((TransactionalEditingDomain)editingDomain, (EObject)owner, (EStructuralFeature)feature, newList);
+ ICommand command = elementEditService.getEditCommand(request);
+ if(command.canExecute()) {
+ return new GMFtoEMFCommandWrapper(command);
+ }
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.facet.widgets.celleditors.internal.DefaultCommandFactory#createRemoveCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * java.lang.Object, java.lang.Object, java.lang.Object)
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public Command createRemoveCommand(final EditingDomain editingDomain, final Object owner, final Object feature, final Object value) {
+ //the ElementEditService doesn't work correctly with nattable elements, so we test the edited element
+ if(isEMFFacetElement(owner)) {
+ return super.createRemoveCommand(editingDomain, owner, feature, value);
+ }
+ IElementEditService elementEditService = ElementEditServiceUtils.getCommandProvider(owner);
+ if(testArgs(owner, feature) && elementEditService != null) {
+ DestroyReferenceRequest request = new DestroyReferenceRequest((TransactionalEditingDomain)editingDomain, (EObject)owner, (EReference)feature, (EObject)value, false);
+ ICommand command = elementEditService.getEditCommand(request);
+ if(command.canExecute()) {
+ return new GMFtoEMFCommandWrapper(command);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.facet.widgets.celleditors.internal.DefaultCommandFactory#createSetCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * java.lang.Object, java.lang.Object, java.lang.Object)
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public Command createSetCommand(final EditingDomain editingDomain, final Object owner, final Object feature, final Object value) {
+ //the ElementEditService doesn't work correctly with nattable elements, so we test the edited element
+ if(isEMFFacetElement(owner)) {
+ return super.createSetCommand(editingDomain, owner, feature, value);
+ }
+ IElementEditService elementEditService = ElementEditServiceUtils.getCommandProvider(owner);
+ if(testArgs(owner, feature) && elementEditService != null) {
+ SetRequest request = new SetRequest((TransactionalEditingDomain)editingDomain, (EObject)owner, (EStructuralFeature)feature, value);
+ ICommand command = elementEditService.getEditCommand(request);
+ if(command.canExecute()) {
+ return new GMFtoEMFCommandWrapper(command);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.facet.widgets.celleditors.internal.DefaultCommandFactory#createSetCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * java.lang.Object, java.lang.Object, java.lang.Object, int)
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public Command createSetCommand(final EditingDomain editingDomain, final Object owner, final Object feature, final Object value, final int index) {
+ //the ElementEditService doesn't work correctly with nattable elements, so we test the edited element
+ if(isEMFFacetElement(owner)) {
+ return super.createSetCommand(null, owner, feature, value, index);
+ }
+ IElementEditService elementEditService = ElementEditServiceUtils.getCommandProvider(owner);
+ if(testArgs(owner, feature) && elementEditService != null) {
+ EObject current = (EObject)owner;
+ Object values = current.eGet((EStructuralFeature)feature);
+ if(values instanceof List<?>) {
+ ArrayList<Object> newList = new ArrayList<Object>();
+ newList.addAll((List<?>)values);
+ newList.set(index, value);
+ SetRequest request = new SetRequest((TransactionalEditingDomain)editingDomain, (EObject)owner, (EStructuralFeature)feature, newList);
+ ICommand command = elementEditService.getEditCommand(request);
+ if(command.canExecute()) {
+ return new GMFtoEMFCommandWrapper(command);
+ }
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/factory/PapyrusTableEfacetCommandFactory.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/factory/PapyrusTableEfacetCommandFactory.java
new file mode 100644
index 00000000000..22b89f488bb
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/factory/PapyrusTableEfacetCommandFactory.java
@@ -0,0 +1,120 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.common.factory;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.edit.command.MoveCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Row;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Table;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.TablePackage;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+
+/**
+ *
+ * This factory provides commands for the PapyrusTable
+ *
+ */
+public class PapyrusTableEfacetCommandFactory {
+
+ private PapyrusTableEfacetCommandFactory() {
+ //to prevent instanciation
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param table
+ * the table
+ * @param rowToMove
+ * the row to move
+ * @return
+ * the command to move the row
+ */
+ public static final Command getMoveLineUpCommand(final EditingDomain domain, final Table table, final Row rowToMove) {
+ if(domain != null && table != null && rowToMove != null) {
+ final EList<Row> allRows = table.getRows();
+ final int currentIndex = allRows.indexOf(rowToMove);
+ if(currentIndex != -1) {
+ final int newIndex = currentIndex - 1;
+ if(newIndex >= 0) {
+ final MoveCommand cmd = new MoveCommand(domain, table, TablePackage.eINSTANCE.getTable_Rows(), rowToMove, newIndex);
+ cmd.setLabel("Move Line Up"); //$NON-NLS-1$
+ return cmd;
+ }
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param table
+ * the table
+ * @param rowToMove
+ * the row to move
+ * @return
+ * the command to move the row
+ */
+ public static final Command getMoveLineDownCommand(final EditingDomain domain, final Table table, final Row rowToMove) {
+ if(domain != null && table != null && rowToMove != null) {
+ final EList<Row> allRows = table.getRows();
+ final int currentIndex = allRows.indexOf(rowToMove);
+ if(currentIndex != -1) {
+ final int newIndex = currentIndex + 1;
+ if(newIndex <= allRows.size() - 1) {
+ final MoveCommand cmd = new MoveCommand(domain, table, TablePackage.eINSTANCE.getTable_Rows(), rowToMove, newIndex);
+ cmd.setLabel("Move Line Down"); //$NON-NLS-1$
+ return cmd;
+ }
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param table
+ * the table
+ * @param rowToMove
+ * the row to move
+ * @return
+ * the command to move the row
+ */
+ public static final Command getMoveLineUpCommand(final EditingDomain domain, final PapyrusTable table, final Row rowToMove) {
+ return getMoveLineUpCommand(domain, table.getTable(), rowToMove);
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param table
+ * the table
+ * @param rowToMove
+ * the row to move
+ * @return
+ * the command to move the row
+ */
+ public static final Command getMoveLineDownCommand(final EditingDomain domain, final PapyrusTable table, final Row rowToMove) {
+ return getMoveLineDownCommand(domain, table.getTable(), rowToMove);
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/AbstractCreateTableEditorHandler.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/AbstractCreateTableEditorHandler.java
new file mode 100644
index 00000000000..0a04068147d
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/AbstractCreateTableEditorHandler.java
@@ -0,0 +1,356 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.common.handlers;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Table;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.TablePackage;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.tableconfiguration.TableConfiguration;
+import org.eclipse.emf.facet.widgets.table.ui.internal.exported.TableWidgetUtils;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.AbstractEMFOperation;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.commands.CheckedOperationHistory;
+import org.eclipse.papyrus.infra.core.editor.BackboneException;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.resource.AbstractBaseModel;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.NotFoundException;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageMngr;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.EditorUtils;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers;
+import org.eclipse.papyrus.infra.table.efacet.common.Activator;
+import org.eclipse.papyrus.infra.table.efacet.common.editor.EditorNameInitializer;
+import org.eclipse.papyrus.infra.table.efacet.common.modelresource.PapyrusTableModelResource;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustableFactory;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+public abstract class AbstractCreateTableEditorHandler extends AbstractHandler {
+
+ /** the default name for the table */
+ private final String defaultName;
+
+ /** the name for the table */
+ private String name;
+
+ /** the editor type */
+ private final String editorType;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param editorType
+ * the type of the editor
+ * @param defaultName
+ * the default name for this editor
+ */
+ public AbstractCreateTableEditorHandler(final String editorType, final String defaultName) {
+ Assert.isNotNull(editorType != null);
+ this.editorType = editorType;
+ this.defaultName = defaultName;
+ }
+
+ /**
+ * Should be overridden in order to restrict creation
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return
+ */
+ @Override
+ public boolean isEnabled() {
+ final EObject context = getTableContext();
+ return context instanceof EObject;
+ }
+
+ /**
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ *
+ * @param event
+ * @return
+ * @throws ExecutionException
+ */
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ try {
+
+ runAsTransaction();
+ } catch (final ServiceException e) {
+ throw new ExecutionException("Can't create TableEditor", e); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @return <code>true</code> to open the name dialog
+ */
+ protected boolean shouldOpenNameDialog() {
+ return true;
+ }
+
+
+
+ /**
+ * Run the command as a transaction. Create a Transaction and delegate the
+ * command to {@link #doExecute(ServicesRegistry)}.
+ *
+ * @throws ServiceException
+ *
+ */
+ public void runAsTransaction() throws ServiceException {
+ final ServicesRegistry serviceRegistry = ServiceUtilsForActionHandlers.getInstance().getServiceRegistry();
+ final TransactionalEditingDomain domain = ServiceUtils.getInstance().getTransactionalEditingDomain(serviceRegistry);
+
+
+ // default Value
+ this.name = EditorNameInitializer.getNameWithIncrement(TablePackage.eINSTANCE.getTable(), defaultName, getTableContext());
+
+ if(shouldOpenNameDialog()) {// this test is used to allow the JUnit
+ // test without ui!
+ final InputDialog dialog = new InputDialog(Display.getCurrent().getActiveShell(), "Create new table", "Table Name", this.name, null); //$NON-NLS-1$ //$NON-NLS-2$
+ if(dialog.open() == Dialog.OK) {
+ // get the name and the description for the table
+ this.name = dialog.getValue();
+ } else {
+ return;
+ }
+ }
+
+
+ // Create the transactional command
+ final AbstractEMFOperation command = new AbstractEMFOperation(domain, "Create " + this.editorType) { //$NON-NLS-1$
+
+ @Override
+ protected IStatus doExecute(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ try {
+ AbstractCreateTableEditorHandler.this.doExecute(serviceRegistry);
+ } catch (final ServiceException e) {
+ Activator.log.error(e);
+ return Status.CANCEL_STATUS;
+ } catch (final NotFoundException e) {
+ Activator.log.error(e);
+ return Status.CANCEL_STATUS;
+ }
+ return Status.OK_STATUS;
+ }
+ };
+
+ // Execute the command
+ try {
+ CheckedOperationHistory.getInstance().execute(command, new NullProgressMonitor(), null);
+ } catch (final ExecutionException e) {
+ Activator.log.error("Can't create Table Editor", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Do the execution of the command.
+ *
+ * @param serviceRegistry
+ * @throws ServiceException
+ * @throws NotFoundException
+ */
+ public void doExecute(final ServicesRegistry serviceRegistry) throws ServiceException, NotFoundException {
+
+ final Object editorModel = createEditorModel(serviceRegistry);
+ // Get the mngr allowing to add/open new editor.
+ final IPageMngr pageMngr = ServiceUtils.getInstance().getIPageMngr(serviceRegistry);
+ // add the new editor model to the sash.
+ pageMngr.openPage(editorModel);
+
+ }
+
+ /**
+ * Create a model identifying the editor. This model will be saved with the
+ * sash
+ *
+ * @return
+ * @throws ServiceException
+ * @throws NotFoundException
+ * The model where to save the TableInstance is not found.
+ */
+ protected Object createEditorModel(final ServicesRegistry serviceRegistry) throws ServiceException, NotFoundException {
+ final PapyrusTable papyrusTable = PapyrustableFactory.eINSTANCE.createPapyrusTable();
+ papyrusTable.setName(this.name);
+ papyrusTable.setType(this.editorType);
+ final PapyrusTableModelResource papyrusModel = (PapyrusTableModelResource)ServiceUtils.getInstance().getModelSet(serviceRegistry).getModelChecked(PapyrusTableModelResource.MODEL_ID);
+ papyrusModel.addPapyrusTable(papyrusTable);
+
+ final PapyrusTableConfiguration configuration = getPapyrusTableConfiguration();
+ if(configuration != null) {
+ papyrusTable.setFillingMode(configuration.getFillingMode());
+ papyrusTable.setContextFeature(configuration.getListenContextFeature());
+ papyrusTable.getQueries().addAll(configuration.getFillingQueries());
+ }
+
+ final EObject context = getTableContext();
+ Assert.isNotNull(context);
+
+ final String description = null;
+ TableConfiguration tableConfiguration = null;
+ if(configuration != null) {
+ tableConfiguration = configuration.getTableConfiguration();
+ }
+ final Object parameter = null;
+ final Table table = TableWidgetUtils.createTableInstance(Collections.EMPTY_LIST, description, tableConfiguration, context, parameter);
+
+ papyrusTable.setTable(table);
+
+ return papyrusTable;
+ }
+
+ /**
+ *
+ * @return the configuration to use for the table. This method can return <code>null</code>
+ */
+ protected final PapyrusTableConfiguration getPapyrusTableConfiguration() {
+ PapyrusTableConfiguration configuration = null;
+ final ResourceSet resourceSet = getTableContext().eResource().getResourceSet();
+
+ final URI uri = getPapyrusTableConfigurationURI();
+ if(uri != null) {
+ final Resource resource = resourceSet.getResource(uri, true);
+ EcoreUtil.resolveAll(resource);
+ if(resource.getContents().get(0) instanceof PapyrusTableConfiguration) {
+ configuration = (PapyrusTableConfiguration)resource.getContents().get(0);
+ }
+ }
+ return configuration;
+ }
+
+ /**
+ *
+ * @return the URI of the Papyrus Table Configuration
+ */
+ protected URI getPapyrusTableConfigurationURI() {
+ return null;
+ }
+
+ /**
+ * Get the current MultiDiagramEditor.
+ *
+ * @return
+ * @throws BackboneException
+ */
+ protected IMultiDiagramEditor getMultiDiagramEditor() throws BackboneException {
+ return EditorUtils.getMultiDiagramEditorChecked();
+ }
+
+ /**
+ * Returns the context used to create the table
+ *
+ * @return the context used to create the table or <code>null</code> if not
+ * found
+ * @throws ServiceException
+ */
+ protected EObject getTableContext() {
+ final List<EObject> selection = getSelection();
+
+ if(!selection.isEmpty()) {
+ return selection.get(0);
+ }
+
+ // we shouldn't try to find a valid context when the selection is not
+ // valid!
+ ModelSet modelSet = null;
+ ServicesRegistry serviceRegistry;
+ try {
+ serviceRegistry = ServiceUtilsForActionHandlers.getInstance().getServiceRegistry();
+ modelSet = ServiceUtils.getInstance().getModelSet(serviceRegistry);
+ } catch (final NullPointerException npe) {
+ //
+ } catch (final ServiceException exception) {
+
+ }
+
+ if(modelSet != null) {
+ final IModel model = modelSet.getModel(org.eclipse.papyrus.infra.core.resource.uml.UmlModel.MODEL_ID);
+
+ if(model instanceof AbstractBaseModel) {
+ return getRootElement(((AbstractBaseModel)model).getResource());
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @return
+ */
+ protected List<EObject> getSelection() {
+ final List<EObject> selectedElements = new ArrayList<EObject>();
+ final ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
+ if(selection instanceof IStructuredSelection) {
+
+ final IStructuredSelection structuredSelection = (IStructuredSelection)selection;
+
+ final Iterator<?> it = structuredSelection.iterator();
+ while(it.hasNext()) {
+ final Object object = it.next();
+ if(object instanceof IAdaptable) {
+ final EObject currentEObject = (EObject)((IAdaptable)object).getAdapter(EObject.class);
+
+ if(currentEObject != null) {
+ selectedElements.add(currentEObject);
+ }
+ }
+
+ }
+ }
+ return selectedElements;
+ }
+
+ /**
+ * Get the root element associated with canvas.
+ */
+ protected EObject getRootElement(final Resource modelResource) {
+ EObject rootElement = null;
+ if(modelResource != null && modelResource.getContents() != null && modelResource.getContents().size() > 0) {
+ final Object root = modelResource.getContents().get(0);
+ if(root instanceof EObject) {
+ rootElement = (EObject)root;
+ }
+ }
+ return rootElement;
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/AbstractMoveRowHandler.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/AbstractMoveRowHandler.java
new file mode 100644
index 00000000000..7321629a146
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/AbstractMoveRowHandler.java
@@ -0,0 +1,144 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.common.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Table;
+import org.eclipse.emf.facet.widgets.table.ui.ITableWidget;
+import org.eclipse.emf.facet.widgets.table.ui.internal.exported.ITableWidgetProvider;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.editor.CoreMultiDiagramEditor;
+import org.eclipse.papyrus.infra.table.efacet.common.editor.AbstractSynchronizedTableEditor;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+
+//import org.eclipse.emf.facet.widgets.table.ui.internal.exported.ITableWidget;
+
+/**
+ *
+ * the abstract class for the move line handler
+ *
+ */
+public abstract class AbstractMoveRowHandler extends AbstractHandler {
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ *
+ * @param event
+ * @return
+ * @throws ExecutionException
+ */
+ public final Object execute(final ExecutionEvent event) throws ExecutionException {
+ final Command cmd = getMoveRowCommand();
+ if(cmd != null && cmd.canExecute()) {
+ //we save the current row selection
+ final List<EObject> selectedRows = getSelectedRowEObject();
+ getEditingDomain().getCommandStack().execute(cmd);
+
+ //we set the old row selection
+ final ITableWidget widget = getTableWidget();
+ widget.selectRows(selectedRows, true);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return
+ */
+ @Override
+ public boolean isEnabled() {
+ return (getSelectedRowEObject().size() == 1) && getMoveRowCommand().canExecute();
+
+ }
+
+ /**
+ *
+ * @return
+ * a list of the selected rows
+ */
+ protected List<EObject> getSelectedRowEObject() {
+ final ITableWidget widget = getTableWidget();
+ return widget.getSelectedRowEObjects();
+ }
+
+ /**
+ *
+ * @return
+ * the current table editor
+ */
+ protected AbstractSynchronizedTableEditor getCurrentTableEditor() {
+ final IWorkbenchPart page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
+ if(page instanceof CoreMultiDiagramEditor) {
+ final IEditorPart activeEditor = ((CoreMultiDiagramEditor)page).getActiveEditor();
+ if(activeEditor instanceof AbstractSynchronizedTableEditor) {
+ return (AbstractSynchronizedTableEditor)activeEditor;
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ *
+ * @return
+ * the current nattable widget
+ */
+ protected ITableWidget getTableWidget() {
+ final AbstractSynchronizedTableEditor editor = getCurrentTableEditor();
+ if(editor != null) {
+ final ITableWidgetProvider provider = (ITableWidgetProvider)editor.getAdapter(ITableWidgetProvider.class);
+ if(provider != null) {
+ final Object widget = provider.getTableWidget();
+ if(widget instanceof ITableWidget) {
+ return (ITableWidget)widget;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @return the editing domain to use for the command
+ */
+ protected TransactionalEditingDomain getEditingDomain() {
+ return (TransactionalEditingDomain)getCurrentTableEditor().getEditingDomain();
+ }
+
+ /**
+ *
+ * @return
+ * the current table
+ */
+ protected Table getTable() {
+ return (Table)getCurrentTableEditor().getAdapter(Table.class);
+ }
+
+ /**
+ *
+ * @return
+ * the command to move the lines
+ */
+ protected abstract Command getMoveRowCommand();
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/DownRowHandler.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/DownRowHandler.java
new file mode 100644
index 00000000000..7de13e2ab25
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/DownRowHandler.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.common.handlers;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Row;
+import org.eclipse.papyrus.infra.table.efacet.common.factory.PapyrusTableEfacetCommandFactory;
+
+/**
+ *
+ * This handler allows to move a line down
+ *
+ */
+public class DownRowHandler extends AbstractMoveRowHandler {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.table.efacet.common.handlers.AbstractMoveRowHandler#getMoveRowCommand()
+ *
+ * @return
+ */
+ @Override
+ protected Command getMoveRowCommand() {
+ final EObject element = getSelectedRowEObject().get(0);
+ for(final Row row : getTable().getRows()) {
+ if(row.getElement() == element) {
+ return PapyrusTableEfacetCommandFactory.getMoveLineDownCommand(getEditingDomain(), getTable(), row);
+ }
+ }
+ return null;
+ }
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/UpRowHandler.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/UpRowHandler.java
new file mode 100644
index 00000000000..f0094099362
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/handlers/UpRowHandler.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.common.handlers;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Row;
+import org.eclipse.papyrus.infra.table.efacet.common.factory.PapyrusTableEfacetCommandFactory;
+
+/**
+ *
+ * This handler allows to move a line up
+ *
+ */
+public class UpRowHandler extends AbstractMoveRowHandler {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.table.efacet.common.handlers.AbstractMoveRowHandler#getMoveRowCommand()
+ *
+ * @return
+ */
+ @Override
+ protected Command getMoveRowCommand() {
+ final EObject element = getSelectedRowEObject().get(0);
+ for(final Row row : getTable().getRows()) {
+ if(row.getElement() == element) {
+ return PapyrusTableEfacetCommandFactory.getMoveLineUpCommand(getEditingDomain(), getTable(), row);
+ }
+ }
+ return null;
+ }
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/input/PapyrusTableEditorInput.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/input/PapyrusTableEditorInput.java
new file mode 100644
index 00000000000..95ee61a5aba
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/input/PapyrusTableEditorInput.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas Bros (Mia-Software) - Bug 331203 - table model editor - initial API and implementation
+ * Nicolas Guyomar (Mia-Software) - Bug 332924 - To be able to save the table
+ * Nicolas Guyomar (Mia-Software) - Bug 333029 - To be able to save the size of the lines and the columns
+ *******************************************************************************/
+package org.eclipse.papyrus.infra.table.efacet.common.input;
+
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+
+/**
+ * Comes from org.eclipse.emf.facet.widget.nattable.workbench.
+ *
+ * This class should not be used by others plugins
+ */
+public class PapyrusTableEditorInput implements IEditorInput {
+
+ /** The input for the Table widget */
+ private final PapyrusTable papyrusTable;
+
+ /** A textual description of what is shown in the editor */
+ private final String description;
+
+ private final EditingDomain editingDomain;
+
+ public PapyrusTableEditorInput(final PapyrusTable papyrusTable, final EditingDomain editingDomain) {
+ this.papyrusTable = papyrusTable;
+ this.description = papyrusTable.getTable().getDescription();
+ this.editingDomain = editingDomain;
+ }
+
+ public PapyrusTable getPapyrusTable() {
+ return this.papyrusTable;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public boolean exists() {
+ return false;
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ return null;
+ }
+
+ public String getName() {
+ return "PapyrusTable Model"; //$NON-NLS-1$
+ }
+
+ public IPersistableElement getPersistable() {
+ return null;
+ }
+
+ public String getToolTipText() {
+ return "PapyrusTable Model"; //$NON-NLS-1$
+ }
+
+ public Object getAdapter(@SuppressWarnings("rawtypes") final Class adapter) {
+ return null;
+ }
+
+ public EditingDomain getEditingDomain() {
+ return this.editingDomain;
+ }
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/listener/AbstractTableTriggerListener.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/listener/AbstractTableTriggerListener.java
new file mode 100644
index 00000000000..6cdc93283a8
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/listener/AbstractTableTriggerListener.java
@@ -0,0 +1,111 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.common.listener;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.emf.facet.efacet.core.IFacetManagerFactory;
+import org.eclipse.emf.facet.widgets.celleditors.ICommandFactoriesRegistry;
+import org.eclipse.emf.facet.widgets.celleditors.ICommandFactory;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Table;
+import org.eclipse.emf.facet.widgets.table.ui.command.ITableCommandFactory;
+import org.eclipse.emf.facet.widgets.table.ui.command.ITableCommandFactoryFactory;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.TriggerListener;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+
+
+
+public abstract class AbstractTableTriggerListener extends TriggerListener {
+
+ /** The table. */
+ protected final PapyrusTable table;
+
+ /**
+ * Instantiates a new abstract table trigger listener.
+ *
+ * @param papyrusTable
+ * the papyrus table
+ */
+ public AbstractTableTriggerListener(final PapyrusTable papyrusTable) {
+ this.table = papyrusTable;
+ }
+
+ /**
+ * @see org.eclipse.emf.transaction.TriggerListener#trigger(org.eclipse.emf.transaction.TransactionalEditingDomain,
+ * org.eclipse.emf.common.notify.Notification)
+ *
+ * @param domain
+ * @param notification
+ * @return
+ */
+
+ @Override
+ protected final Command trigger(final TransactionalEditingDomain domain, final Notification notification) {
+ if(isManagedNotification(notification)) {
+ return getSynchronizationCommand(domain, notification);
+ }
+ return null;
+ }
+
+ /**
+ * Gets the synchronization command.
+ *
+ * @param domain
+ * the domain
+ * @param notification
+ * the notification
+ * @return the synchronization command
+ */
+ protected Command getSynchronizationCommand(final TransactionalEditingDomain domain, final Notification notification) {
+ return null;
+ }
+
+ /**
+ * Checks if is managed notification.
+ *
+ * @param notification
+ * the notification
+ * @return true, if is managed notification
+ */
+ protected abstract boolean isManagedNotification(Notification notification);
+
+ /**
+ * Gets the command name.
+ *
+ * @param notification
+ * the notification
+ * @return the command name
+ */
+ protected abstract String getCommandName(final Notification notification);
+
+ /**
+ *
+ * @param editingDomain
+ * the editing domain
+ * @param resourceSet
+ * the resource set
+ * @param table
+ * the table
+ * @return
+ * the command factory for these parameters
+ */
+ public static ITableCommandFactory getTableCmdFactory(final TransactionalEditingDomain editingDomain, final ResourceSet resourceSet, final Table table) {
+ final IFacetManager facetManager = IFacetManagerFactory.DEFAULT.getOrCreateFacetManager(resourceSet);
+ final ICommandFactory commandFactory = ICommandFactoriesRegistry.INSTANCE.getCommandFactoryFor(editingDomain);
+ final ITableCommandFactory tableCmdFactory = ITableCommandFactoryFactory.DEFAULT.createTableCommandFactory(table, editingDomain, commandFactory, facetManager);
+ return tableCmdFactory;
+ }
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/listener/FillingListener.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/listener/FillingListener.java
new file mode 100644
index 00000000000..0cdd0cc6bb2
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/listener/FillingListener.java
@@ -0,0 +1,371 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.common.listener;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.ETypedElement;
+import org.eclipse.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.emf.facet.efacet.core.IFacetManagerFactory;
+import org.eclipse.emf.facet.efacet.core.exception.FacetManagerException;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.FacetReference;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.Query;
+import org.eclipse.emf.facet.widgets.table.ui.command.ITableCommandFactory;
+import org.eclipse.emf.facet.widgets.table.ui.internal.exported.TableWidgetUtils;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.core.sashwindows.di.PageRef;
+import org.eclipse.papyrus.infra.core.sashwindows.di.TabFolder;
+import org.eclipse.papyrus.infra.table.efacet.common.Activator;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.TableContentsUtils;
+
+/**
+ *
+ * This listener provides the command to synchronize the table when something changes in the uml file OR when the table is opened
+ *
+ */
+public class FillingListener extends AbstractTableTriggerListener {
+
+ /**
+ * this set stores the eobjects already managed by an addRow command
+ */
+ private final Set<EObject> addedEObjects = new HashSet<EObject>();
+
+ /**
+ * this set stores the eobjects already managed by a deleteRow command
+ */
+ private final Set<EObject> deletedEObjects = new HashSet<EObject>();
+
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param table
+ * the table to fill
+ * @param natTableWidget
+ */
+ public FillingListener(final PapyrusTable table) {
+ super(table);
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain used for the command
+ * @return
+ */
+ @Override
+ public Command getSynchronizationCommand(final TransactionalEditingDomain domain, final Notification notification) {
+ //we build the list of the eobjects to add and remove
+ List<EObject> toAdd = null;
+ List<EObject> toRemove = null;
+ CompoundCommand compoundCommand = null;
+ if(this.table.isUsingUser()) {
+ toAdd = Collections.emptyList();
+ toRemove = Collections.emptyList();
+ } else if(this.table.isUsingContextFeature()) {
+ final EReference ref = this.table.getContextFeature();
+ if(!ref.isDerived()) {//TODO improve the usage of the notification in this case
+ //TODO verify that the query to define accepted elements in a table is already called
+ final List<EObject>[] addRemove = getElementToAddRemoveUsingContextFeature(this.table);
+ toAdd = addRemove[0];
+ toRemove = addRemove[1];
+ } else {
+ //TODO verify that the query to define accepted elements in a table is already called
+ final List<EObject>[] addRemove = getElementToAddRemoveUsingContextFeature(this.table);
+ toAdd = addRemove[0];
+ toRemove = addRemove[1];
+ }
+ } else if(this.table.isUsingQueries()) {
+ final List<EObject>[] addRemove = getElementToAddRemoveUsingQueries(this.table);
+ toAdd = addRemove[0];
+ toRemove = addRemove[1];
+ }
+
+ //we clean the list (remove eobject already managed)
+ toAdd.removeAll(this.addedEObjects);
+ toRemove.removeAll(this.deletedEObjects);
+
+ //we update the list of already managed elements
+ this.addedEObjects.addAll(toAdd);
+ this.deletedEObjects.addAll(toRemove);
+
+ final ITableCommandFactory factory = getTableCmdFactory(domain, this.table.getTable().eResource().getResourceSet(), this.table.getTable());
+ final Command removeCommand = createRemoveCommand(domain, factory, toRemove);
+ final Command addCommand = createAddCommand(domain, factory, toAdd);
+
+ if(removeCommand != null || addCommand != null) {
+ compoundCommand = new CompoundCommand(getCommandName(notification));
+ if(removeCommand != null && removeCommand.canExecute()) {
+ compoundCommand.append(removeCommand);
+ }
+ if(addCommand != null && addCommand.canExecute()) {
+ compoundCommand.append(addCommand);
+ }
+ }
+ return compoundCommand;
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param factory
+ * the factory to use to build the command
+ * @param toRemove
+ * the eobjets to remove
+ * @return
+ * the command to remove rows
+ */
+ private final Command createRemoveCommand(final TransactionalEditingDomain domain, final ITableCommandFactory factory, final List<EObject> toRemove) {
+ CompoundCommand cmd = null;
+ if(!toRemove.isEmpty()) {
+ cmd = new CompoundCommand("Table Synchronization Command (Remove Rows)");
+ cmd.append(factory.createRemoveRowByEObjectCommand(toRemove));
+ cmd.append(new GMFtoEMFCommandWrapper(new AbstractTransactionalCommand(domain, "Clean the set deletedEObjects", null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ FillingListener.this.deletedEObjects.removeAll(toRemove);
+ return CommandResult.newOKCommandResult();
+ }
+ }));
+ }
+ return cmd;
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param factory
+ * the factory to use to build the command
+ * @param toAdd
+ * the eobjects to add
+ * @return
+ * the command to add rows
+ */
+ private final Command createAddCommand(final TransactionalEditingDomain domain, final ITableCommandFactory factory, final List<EObject> toAdd) {
+ CompoundCommand cmd = null;
+ if(!toAdd.isEmpty()) {
+ cmd = new CompoundCommand("Table Synchronization Command (Remove Rows)");
+ //duplicated code from the widget
+ cmd.append(factory.createAddRowsCommand(toAdd));
+ cmd.append(factory.createSetFacetSetsCommand(this.table.getTable().getFacetSets()));
+
+ cmd.append(new GMFtoEMFCommandWrapper(new AbstractTransactionalCommand(domain, "Clean the set addedEObjects", null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ FillingListener.this.addedEObjects.removeAll(toAdd);;
+ return CommandResult.newOKCommandResult();
+ }
+ }));
+ }
+ return cmd;
+ }
+
+
+
+ /**
+ *
+ * @return
+ * an array of lists. the first list contains the elements to add and the second list contains the elements to remove
+ */
+ @SuppressWarnings("unchecked")
+ private final List<EObject>[] getElementToAddRemoveUsingQueries(final PapyrusTable papyrusTable) {
+ final List<?>[] addRemove = new List<?>[2];
+ final List<EObject> toAdd = new ArrayList<EObject>();
+ final List<EObject> toRemove = new ArrayList<EObject>();
+ final IFacetManager facetManager = IFacetManagerFactory.DEFAULT.getOrCreateFacetManager(papyrusTable.eResource());
+ final Set<EObject> allElements = new HashSet<EObject>();
+ for(final Query current : papyrusTable.getQueries()) {
+ EObject container = current.eContainer();
+ if(container instanceof FacetReference) {
+ try {
+ List<EObject> res = facetManager.getOrInvokeMultiValued(papyrusTable, (ETypedElement)container, null);
+ if(res != null) {
+ allElements.addAll(res);
+ }
+ } catch (FacetManagerException e) {
+ Activator.log.equals(e);
+ }
+ }
+ }
+ final List<EObject> currentContent = TableContentsUtils.getTableContents(papyrusTable, papyrusTable.getTable().getContext(), false);
+ final ArrayList<EObject> newValue = new ArrayList<EObject>((Set<EObject>)allElements);
+ //fill the add list
+
+ toAdd.addAll(newValue);
+ toAdd.removeAll(currentContent);
+
+ //fill the removeList
+ currentContent.removeAll(newValue);
+ toRemove.addAll(currentContent);
+
+ addRemove[0] = toAdd;
+ addRemove[1] = toRemove;
+ return (List<EObject>[])addRemove;
+ }
+
+
+ /**
+ *
+ * @return
+ * an array of lists. the first list contains the elements to add and the second list contains the elements to remove
+ */
+ @SuppressWarnings("unchecked")
+ private final List<EObject>[] getElementToAddRemoveUsingContextFeature(final PapyrusTable papyrusTable) {
+ final List<?>[] addRemove = new List<?>[2];
+ final List<EObject> toAdd = new ArrayList<EObject>();
+ final List<EObject> toRemove = new ArrayList<EObject>();
+ addRemove[0] = toAdd;
+ addRemove[1] = toRemove;
+
+
+ final List<EObject> currentContent = TableWidgetUtils.getElements(papyrusTable.getTable());
+ final Object value = papyrusTable.getTable().getContext().eGet(papyrusTable.getContextFeature());
+ if(value instanceof List<?>) {
+ final ArrayList<EObject> newValue = new ArrayList<EObject>((List<EObject>)value);
+ //fill the add list
+ // newValue.removeAll(currentContent);
+ toAdd.addAll(newValue);
+ toAdd.removeAll(currentContent);
+
+ //fill the removeList
+ currentContent.removeAll(newValue);
+ toRemove.addAll(currentContent);
+ } else {
+ //we do nothing
+ }
+ return (List<EObject>[])addRemove;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.table.efacet.common.listener.AbstractSynchronizedTableListener#isManagedNotification(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ * @return
+ */
+ @Override
+ protected boolean isManagedNotification(final Notification notification) {
+ return isUsingQueries() || isTableOpening(notification) || isModifyingModel(notification) || isFillingModeChanging(notification);
+ }
+
+ /**
+ *
+ * @return
+ * <code>true</code> if the table is filled using queries
+ */
+ protected boolean isUsingQueries() {
+ return this.table.isUsingQueries();
+ }
+
+ /**
+ *
+ * @param notification
+ * a notification
+ * @return
+ * <code>true</code> if the filling mode is changing
+ */
+ protected boolean isFillingModeChanging(final Notification notification) {
+ return (notification.getNotifier() == this.table && notification.getFeature() == PapyrustablePackage.eINSTANCE.getPapyrusTable_FillingMode());
+ }
+
+ /**
+ *
+ * @param notification
+ * a notification
+ * @return
+ * <code>true</code> if we are opening a table
+ */
+ protected boolean isTableOpening(final Notification notification) {
+ final Object notifier = notification.getNotifier();
+ if(notifier instanceof EObject) {
+ final EObject eobject = (EObject)notifier;
+ if(notifier instanceof TabFolder) {
+ final Object newValue = notification.getNewValue();
+ PageRef ref = null;
+ if(newValue instanceof PageRef) {
+ ref = (PageRef)newValue;
+ }
+ if(ref != null && ref.getEmfPageIdentifier() == this.table) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @param notification
+ * a notification
+ * @return
+ * <code>true</code> if we are modifying the model
+ */
+ protected boolean isModifyingModel(final Notification notification) {
+ final Object notifier = notification.getNotifier();
+ if(notifier instanceof EObject) {
+ final EObject eobject = (EObject)notifier;
+ if(eobject.eResource() != null && eobject.eResource() == this.table.getTable().getContext().eResource()) { //$NON-NLS-1$
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @param notification
+ * the notification
+ * @return
+ * the name of the command to use
+ */
+ @Override
+ protected String getCommandName(final Notification notification) {
+ final String commandName;
+ if(isUsingQueries()) {
+ commandName = "Synchronized Table Command (Contents Changes Using Queries)";
+ } else if(isFillingModeChanging(notification)) {
+ commandName = "Synchronized Table Command (Filling Mode Changed)";
+ } else if(isTableOpening(notification)) {
+ commandName = "Synchronized Table Command (Updating Opening Table)";
+ } else if(isModifyingModel(notification)) {
+ commandName = "Synchronized Table Command (Update for Model Changes)";
+ } else {
+ commandName = "";
+ }
+ return commandName;
+ }
+
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/listener/MoveTableLineListener.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/listener/MoveTableLineListener.java
new file mode 100644
index 00000000000..ea0113c4228
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/listener/MoveTableLineListener.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.common.listener;
+
+import java.util.List;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.MoveCommand;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Row;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.TablePackage;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+
+/**
+ *
+ * This listener allows to know when a line has been moved in the table
+ *
+ */
+public class MoveTableLineListener extends AbstractTableTriggerListener {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param table
+ */
+ public MoveTableLineListener(final PapyrusTable table) {
+ super(table);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.table.efacet.common.listener.AbstractSynchronizedTableListener#isManagedNotification(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ * @return
+ */
+ @Override
+ protected boolean isManagedNotification(final Notification notification) {
+ if(notification.getEventType() == Notification.MOVE && notification.getNotifier() == this.table.getTable() && notification.getFeature() == TablePackage.eINSTANCE.getTable_Rows()) {
+ if(this.table.isUsingContextFeature()) {
+ final EStructuralFeature feature = this.table.getContextFeature();
+ if(feature != null && feature.isOrdered()) {
+ return true;
+ }
+
+ }
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.table.efacet.common.listener.AbstractSynchronizedTableListener#getSynchronizationCommand(org.eclipse.emf.transaction.TransactionalEditingDomain,
+ * org.eclipse.emf.common.notify.Notification)
+ *
+ * @param domain
+ * @param notification
+ * @return
+ */
+ @Override
+ public Command getSynchronizationCommand(final TransactionalEditingDomain domain, final Notification notification) {
+ final EObject tableContext = this.table.getTable().getContext();
+ final Object currentValue = tableContext.eGet(this.table.getContextFeature());
+ final EObject movedValue = ((Row)notification.getNewValue()).getElement();
+ if(currentValue instanceof List<?>) {
+ final MoveCommand cmd = new MoveCommand(domain, tableContext, this.table.getContextFeature(), movedValue, notification.getPosition());
+ cmd.setLabel(getCommandName(notification));
+ return cmd;
+ }
+ return null;
+ }
+
+ @Override
+ protected String getCommandName(final Notification notification) {
+ return "Move Line Command (Update the Model)";
+ }
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/modelresource/EMFFacetTableModelResource.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/modelresource/EMFFacetTableModelResource.java
new file mode 100644
index 00000000000..51802ebbb1a
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/modelresource/EMFFacetTableModelResource.java
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ * Copyright (c) 2011 LIFL & CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin (LIFL) cedric.dumoulin@lifl.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.table.efacet.common.modelresource;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.TableInstance;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Table;
+import org.eclipse.papyrus.infra.core.resource.AbstractModelWithSharedResource;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+
+
+
+/**
+ * A model used to save data from the {@link DefaultNattableEditor}
+ *
+ * @author cedric dumoulin
+ *
+ */
+public class EMFFacetTableModelResource extends /* AbstractBaseModel */AbstractModelWithSharedResource<TableInstance> implements IModel {
+
+ /*
+ * To save in a new file :
+ * the class should extends AbstractBaseModel and NOTATION_FILE_EXTENSION = "nattable" for example
+ */
+
+
+ /**
+ * File extension used for notation.
+ */
+ // public static final String NOTATION_FILE_EXTENSION = "nattable"; //$NON-NLS-1$
+
+ public static final String NOTATION_FILE_EXTENSION = "notation"; //$NON-NLS-1$
+
+ /**
+ * Model ID.
+ */
+ public static final String MODEL_ID = "org.eclipse.papyrus.emf.facet.table.resource.TableModel"; //$NON-NLS-1$
+
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public EMFFacetTableModelResource() {
+
+ }
+
+ // Initialize stuff in the model.
+ @Override
+ public void init(final ModelSet modelManager) {
+ super.init(modelManager);
+ // nothing to do now
+ }
+
+ /**
+ * Get the file extension used for this model.
+ *
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#getModelFileExtension()
+ *
+ * @return
+ */
+ @Override
+ protected String getModelFileExtension() {
+ return NOTATION_FILE_EXTENSION;
+ }
+
+ /**
+ * Get the identifier used to register this model.
+ *
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#getIdentifier()
+ *
+ * @return
+ */
+ @Override
+ public String getIdentifier() {
+ return MODEL_ID;
+ }
+
+
+ /**
+ * Add a new initialized {@link Diagram} to the model.
+ *
+ * @param newDiagram
+ * The diagram to add.
+ */
+ public void addTableInstance(final Table tableInstance) {
+ getResource().getContents().add(tableInstance);
+ }
+
+ /**
+ * Add a new initialized {@link Diagram} to the model.
+ *
+ * @param newDiagram
+ * The diagram to add.
+ */
+ public void removeTableInstance(final Table tableInstance) {
+ getResource().getContents().remove(tableInstance);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractModelWithSharedResource#isModelRoot(org.eclipse.emf.ecore.EObject)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ protected boolean isModelRoot(final EObject object) {
+ return false;
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/modelresource/PapyrusTableModelResource.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/modelresource/PapyrusTableModelResource.java
new file mode 100644
index 00000000000..01a743d541a
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/modelresource/PapyrusTableModelResource.java
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ * Copyright (c) 2011 LIFL & CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Cedric Dumoulin (LIFL) cedric.dumoulin@lifl.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.table.efacet.common.modelresource;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Table;
+import org.eclipse.papyrus.infra.core.resource.AbstractModelWithSharedResource;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+
+
+
+/**
+ * A model used to save data from the {@link DefaultNattableEditor}
+ *
+ * @author cedric dumoulin
+ *
+ */
+public class PapyrusTableModelResource extends AbstractModelWithSharedResource<Table> implements IModel {
+
+ /*
+ * To save in a new file :
+ * the class should extends AbstractBaseModel and NOTATION_FILE_EXTENSION = "nattable" for example
+ */
+
+
+ /**
+ * File extension used for notation.
+ */
+ // public static final String NOTATION_FILE_EXTENSION = "nattable"; //$NON-NLS-1$
+
+ public static final String NOTATION_FILE_EXTENSION = "notation"; //$NON-NLS-1$
+
+ /**
+ * Model ID.
+ */
+ public static final String MODEL_ID = "org.eclipse.papyrus.infra.table.efacet.common.modelresource.PapyrusTableModelResource"; //$NON-NLS-1$
+
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public PapyrusTableModelResource() {
+
+ }
+
+ // Initialize stuff in the model.
+ @Override
+ public void init(final ModelSet modelManager) {
+ super.init(modelManager);
+ // nothing to do now
+ }
+
+ /**
+ * Get the file extension used for this model.
+ *
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#getModelFileExtension()
+ *
+ * @return
+ */
+ @Override
+ protected String getModelFileExtension() {
+ return NOTATION_FILE_EXTENSION;
+ }
+
+ /**
+ * Get the identifier used to register this model.
+ *
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#getIdentifier()
+ *
+ * @return
+ */
+ @Override
+ public String getIdentifier() {
+ return MODEL_ID;
+ }
+
+
+ /**
+ * Add a new initialized {@link PapyrusTable} to the model.
+ *
+ * @param papyrusTable
+ * The tableInstance to add.
+ */
+ public void addPapyrusTable(final PapyrusTable papyrusTable) {
+ getResource().getContents().add(papyrusTable);
+ }
+
+ /**
+ * Add a new initialized {@link PapyrusTable} to the model.
+ *
+ * @param papyrusTable
+ * The tableInstance to add.
+ */
+ public void removePapyrusTable(final PapyrusTable papyrusTable) {
+ getResource().getContents().remove(papyrusTable);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.core.resource.AbstractModelWithSharedResource#isModelRoot(org.eclipse.emf.ecore.EObject)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ protected boolean isModelRoot(final EObject object) {
+ return false;
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/tester/TablePropertyTester.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/tester/TablePropertyTester.java
new file mode 100644
index 00000000000..f45ab1a19b4
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.common/src/org/eclipse/papyrus/infra/table/efacet/common/tester/TablePropertyTester.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.common.tester;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.papyrus.infra.core.editor.CoreMultiDiagramEditor;
+import org.eclipse.papyrus.infra.table.efacet.common.editor.AbstractSynchronizedTableEditor;
+
+/**
+ *
+ * This class provides tests to define the enablement of the actions
+ *
+ */
+public class TablePropertyTester extends PropertyTester {
+
+ /** this property is used to know if the current editor is a PapyrusTableEditor */
+ final String IS_PAPYRUS_TABLE_EFACET = "isPapyrusTableEfacet"; //$NON-NLS-1$
+
+ /**
+ *
+ * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
+ *
+ * @param receiver
+ * @param property
+ * @param args
+ * @param expectedValue
+ * @return
+ */
+ public boolean test(final Object receiver, final String property, final Object[] args, final Object expectedValue) {
+ if(this.IS_PAPYRUS_TABLE_EFACET.equals(property) && receiver instanceof CoreMultiDiagramEditor) {
+ return expectedValue.equals((((CoreMultiDiagramEditor)receiver).getActiveEditor() instanceof AbstractSynchronizedTableEditor));
+ }
+ return false;
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/.classpath b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/.classpath
new file mode 100644
index 00000000000..cedf0d0d0b5
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/.project b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/.project
new file mode 100644
index 00000000000..57e3fdfb252
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.table.efacet.metamodel.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/META-INF/MANIFEST.MF b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..76f9476f953
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.table.efacet.metamodel.papyr
+ ustable.provider
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.emf.facet.widgets.celleditors;visibility:=reexport,
+ org.eclipse.emf.facet.widgets.celleditors.edit;visibility:=reexport,
+ org.eclipse.emf.facet.custom.metamodel;visibility:=reexport,
+ org.eclipse.emf.facet.custom.metamodel.edit;visibility:=reexport,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.emf.facet.efacet.metamodel;visibility:=reexport,
+ org.eclipse.emf.facet.efacet.metamodel.edit;visibility:=reexport,
+ org.eclipse.emf.facet.widgets.table.metamodel;visibility:=reexport,
+ org.eclipse.emf.facet.widgets.table.metamodel.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.table.efacet.metamodel;bundle-version="0.10.1"
+Bundle-Vendor: %providerName
+Bundle-Version: 0.10.1.qualifier
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.table.efacet.metamodel.pap
+ yrustable.provider.PapyrustableEditPlugin$Implementation
+Bundle-SymbolicName: org.eclipse.papyrus.infra.table.efacet.metamodel.
+ edit;singleton:=true
+
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/build.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/build.properties
new file mode 100644
index 00000000000..0907e276e95
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/build.properties
@@ -0,0 +1,19 @@
+# Copyright (c) 2011 CEA LIST.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src-gen/
+output.. = bin/
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/icons/full/obj16/PapyrusTable.gif b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/icons/full/obj16/PapyrusTable.gif
new file mode 100644
index 00000000000..106881e5d9b
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/icons/full/obj16/PapyrusTable.gif
Binary files differ
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/plugin.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/plugin.properties
new file mode 100644
index 00000000000..bd223e91e20
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/plugin.properties
@@ -0,0 +1,43 @@
+# Copyright (c) 2011 CEA LIST.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+
+pluginName = Papyrustable Edit Support
+providerName = www.example.org
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_PapyrusTable_type = Papyrus Table
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_PapyrusTable_name_feature = Name
+_UI_PapyrusTable_type_feature = Type
+_UI_PapyrusTable_table_feature = Table
+_UI_PapyrusTable_fillingMode_feature = Filling Mode
+_UI_PapyrusTable_feature_feature = Feature
+_UI_PapyrusTable_queries_feature = Queries
+_UI_PapyrusTable_usingUser_feature = Using User
+_UI_PapyrusTable_usingContextFeature_feature = Using Context Feature
+_UI_PapyrusTable_usingQueries_feature = Using Queries
+_UI_Unknown_feature = Unspecified
+
+_UI_FillingMode_User_literal = USER
+_UI_FillingMode_Queries_literal = QUERIES
+_UI_FillingMode_ContextFeature_literal = CONTEXT_FEATURE
+_UI_PapyrusTable_contextFeature_feature = Context Feature
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/plugin.xml b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/plugin.xml
new file mode 100644
index 00000000000..87fc115bb99
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/plugin.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2011 CEA LIST.
+
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://www.eclipse.org/Papyrus/PapyrusTable/0.9.0/papyrustable"
+ class="org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.provider.PapyrustableItemProviderAdapterFactory"
+ 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/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/provider/PapyrusTableItemProvider.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/provider/PapyrusTableItemProvider.java
new file mode 100644
index 00000000000..8460dde6dbf
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/provider/PapyrusTableItemProvider.java
@@ -0,0 +1,358 @@
+/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.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.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrusTableItemProvider
+ 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 PapyrusTableItemProvider(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);
+
+ addNamePropertyDescriptor(object);
+ addTypePropertyDescriptor(object);
+ addTablePropertyDescriptor(object);
+ addFillingModePropertyDescriptor(object);
+ addContextFeaturePropertyDescriptor(object);
+ addQueriesPropertyDescriptor(object);
+ addUsingUserPropertyDescriptor(object);
+ addUsingContextFeaturePropertyDescriptor(object);
+ addUsingQueriesPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * 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_PapyrusTable_name_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTable_name_feature", "_UI_PapyrusTable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PapyrustablePackage.Literals.PAPYRUS_TABLE__NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Type feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTypePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusTable_type_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTable_type_feature", "_UI_PapyrusTable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PapyrustablePackage.Literals.PAPYRUS_TABLE__TYPE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Table feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTablePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusTable_table_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTable_table_feature", "_UI_PapyrusTable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PapyrustablePackage.Literals.PAPYRUS_TABLE__TABLE,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Filling Mode feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addFillingModePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusTable_fillingMode_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTable_fillingMode_feature", "_UI_PapyrusTable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PapyrustablePackage.Literals.PAPYRUS_TABLE__FILLING_MODE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Context Feature feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addContextFeaturePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusTable_contextFeature_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTable_contextFeature_feature", "_UI_PapyrusTable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PapyrustablePackage.Literals.PAPYRUS_TABLE__CONTEXT_FEATURE,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Queries feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addQueriesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusTable_queries_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTable_queries_feature", "_UI_PapyrusTable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PapyrustablePackage.Literals.PAPYRUS_TABLE__QUERIES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Using User feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addUsingUserPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusTable_usingUser_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTable_usingUser_feature", "_UI_PapyrusTable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PapyrustablePackage.Literals.PAPYRUS_TABLE__USING_USER,
+ false,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Using Context Feature feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addUsingContextFeaturePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusTable_usingContextFeature_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTable_usingContextFeature_feature", "_UI_PapyrusTable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PapyrustablePackage.Literals.PAPYRUS_TABLE__USING_CONTEXT_FEATURE,
+ false,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Using Queries feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addUsingQueriesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusTable_usingQueries_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTable_usingQueries_feature", "_UI_PapyrusTable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PapyrustablePackage.Literals.PAPYRUS_TABLE__USING_QUERIES,
+ false,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns PapyrusTable.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PapyrusTable")); //$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 = ((PapyrusTable)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_PapyrusTable_type") : //$NON-NLS-1$
+ getString("_UI_PapyrusTable_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(PapyrusTable.class)) {
+ case PapyrustablePackage.PAPYRUS_TABLE__NAME:
+ case PapyrustablePackage.PAPYRUS_TABLE__TYPE:
+ case PapyrustablePackage.PAPYRUS_TABLE__FILLING_MODE:
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_USER:
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_CONTEXT_FEATURE:
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_QUERIES:
+ 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 PapyrustableEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/provider/PapyrustableEditPlugin.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/provider/PapyrustableEditPlugin.java
new file mode 100644
index 00000000000..b0aa5a1700b
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/provider/PapyrustableEditPlugin.java
@@ -0,0 +1,116 @@
+/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.custom.provider.CustomEditPlugin;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.provider.Efacet2EditPlugin;
+import org.eclipse.emf.facet.widgets.celleditors.edit.CelleditorsEditPlugin;
+
+//import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.provider.Tableinstance02EditPlugin;
+//
+//import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.tableconfiguration.provider.TableConfigurationEditPlugin;
+
+/**
+ * This is the central singleton for the Papyrustable edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class PapyrustableEditPlugin extends EMFPlugin {
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final PapyrustableEditPlugin INSTANCE = new PapyrustableEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public PapyrustableEditPlugin() {
+ super(new ResourceLocator[]{ CelleditorsEditPlugin.INSTANCE, CustomEditPlugin.INSTANCE, EcoreEditPlugin.INSTANCE, Efacet2EditPlugin.INSTANCE,/*
+ * TableConfigurationEditPlugin
+ * .
+ * INSTANCE
+ * ,
+ * Tableinstance02EditPlugin
+ * .
+ * INSTANCE
+ * ,
+ */});
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/provider/PapyrustableItemProviderAdapterFactory.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/provider/PapyrustableItemProviderAdapterFactory.java
new file mode 100644
index 00000000000..777ea5ef2c7
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/provider/PapyrustableItemProviderAdapterFactory.java
@@ -0,0 +1,209 @@
+/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.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.table.efacet.metamodel.papyrustable.util.PapyrustableAdapterFactory;
+
+/**
+ * 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 PapyrustableItemProviderAdapterFactory extends PapyrustableAdapterFactory 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 PapyrustableItemProviderAdapterFactory() {
+ 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.table.efacet.metamodel.papyrustable.PapyrusTable} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusTableItemProvider papyrusTableItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPapyrusTableAdapter() {
+ if (papyrusTableItemProvider == null) {
+ papyrusTableItemProvider = new PapyrusTableItemProvider(this);
+ }
+
+ return papyrusTableItemProvider;
+ }
+
+ /**
+ * 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 (papyrusTableItemProvider != null) papyrusTableItemProvider.dispose();
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/.classpath b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/.project b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/.project
new file mode 100644
index 00000000000..db212779ae1
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.table.efacet.metamodel.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/.settings/org.eclipse.jdt.core.prefs b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/META-INF/MANIFEST.MF b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..5a734c232b3
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.infra.table.efacet.metamodel;bundle-version="0.10.1"
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.10.1.qualifier
+Bundle-Name: Tests for Papyrus Table EFacet (Incubation)
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.table.efacet.metamodel.tes
+ ts.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.infra.table.efacet.metamodel.
+ tests
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/build.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/build.properties
new file mode 100644
index 00000000000..41eb6ade2b4
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/org.eclipse.papyrus.infra.efacet.metamodel.tests.launch b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/org.eclipse.papyrus.infra.efacet.metamodel.tests.launch
new file mode 100644
index 00000000000..bef9f044266
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/org.eclipse.papyrus.infra.efacet.metamodel.tests.launch
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/src/org/eclipse/papyrus/infra/table/efacet/metamodel/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.infra.table.efacet.metamodel.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.infra.table.efacet.metamodel.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms60m -Xmx1024m -DsuppressRawWhenUnchecked=true -XX:MaxPermSize=256M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/src/org/eclipse/papyrus/infra/table/efacet/metamodel/tests/Activator.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/src/org/eclipse/papyrus/infra/table/efacet/metamodel/tests/Activator.java
new file mode 100644
index 00000000000..c50b7c4a4f4
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/src/org/eclipse/papyrus/infra/table/efacet/metamodel/tests/Activator.java
@@ -0,0 +1,66 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.tests;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.table.efacet.metamodel.tests"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(final BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(final BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/src/org/eclipse/papyrus/infra/table/efacet/metamodel/tests/AllTests.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/src/org/eclipse/papyrus/infra/table/efacet/metamodel/tests/AllTests.java
new file mode 100644
index 00000000000..8f7db7fea77
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/src/org/eclipse/papyrus/infra/table/efacet/metamodel/tests/AllTests.java
@@ -0,0 +1,25 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+
+package org.eclipse.papyrus.infra.table.efacet.metamodel.tests;
+
+import org.eclipse.papyrus.infra.table.efacet.metamodel.tests.generatednot.PapyrusTableTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses({ PapyrusTableTest.class })
+public class AllTests {
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/src/org/eclipse/papyrus/infra/table/efacet/metamodel/tests/generatednot/PapyrusTableTest.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/src/org/eclipse/papyrus/infra/table/efacet/metamodel/tests/generatednot/PapyrusTableTest.java
new file mode 100644
index 00000000000..bfda82c37ea
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel.tests/src/org/eclipse/papyrus/infra/table/efacet/metamodel/tests/generatednot/PapyrusTableTest.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.tests.generatednot;
+
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustableFactory;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ *
+ * This class test the call of the methods which should be 'tagged generated NOT'
+ *
+ */
+public class PapyrusTableTest {
+
+ @Test
+ public void testIsUsingUser() {
+ final PapyrusTable table = PapyrustableFactory.eINSTANCE.createPapyrusTable();
+ table.setFillingMode(FillingMode.USER);
+ Assert.assertEquals("The method PapyrusTable.isUsingUser doesn't return the wanted value", true, table.isUsingUser());
+ Assert.assertEquals("The method PapyrusTable.isUsingContextFeature() doesn't return the wanted value", false, table.isUsingContextFeature());
+ Assert.assertEquals("The method PapyrusTable.isUsingQueries() doesn't return the wanted value", false, table.isUsingQueries());
+ }
+
+ @Test
+ public void testisUsingContextFeature() {
+ final PapyrusTable table = PapyrustableFactory.eINSTANCE.createPapyrusTable();
+ table.setFillingMode(FillingMode.CONTEXT_FEATURE);
+ Assert.assertEquals("The method PapyrusTable.isUsingUser doesn't return the wanted value", false, table.isUsingUser());
+ Assert.assertEquals("The method PapyrusTable.isUsingContextFeature() doesn't return the wanted value", true, table.isUsingContextFeature());
+ Assert.assertEquals("The method PapyrusTable.isUsingQueries() doesn't return the wanted value", false, table.isUsingQueries());
+ }
+
+ @Test
+ public void testIsUsingQueries() {
+ final PapyrusTable table = PapyrustableFactory.eINSTANCE.createPapyrusTable();
+ table.setFillingMode(FillingMode.QUERIES);
+ Assert.assertEquals("The method PapyrusTable.isUsingUser doesn't return the wanted value", false, table.isUsingUser());
+ Assert.assertEquals("The method PapyrusTable.isUsingContextFeature() doesn't return the wanted value", false, table.isUsingContextFeature());
+ Assert.assertEquals("The method PapyrusTable.isUsingQueries() doesn't return the wanted value", true, table.isUsingQueries());
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/.classpath b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/.classpath
new file mode 100644
index 00000000000..afb9bb46ef3
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/.project b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/.project
new file mode 100644
index 00000000000..201b33d850a
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.table.efacet.metamodel</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/META-INF/MANIFEST.MF b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..97a8ebb90fe
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable,
+ org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl,
+ org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.facet.widgets.celleditors,
+ org.eclipse.emf.facet.custom.metamodel,
+ org.eclipse.emf.facet.efacet.metamodel,
+ org.eclipse.emf.facet.widgets.table.metamodel
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 0.10.1.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.table.efacet.metamodel;
+ singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/build.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/build.properties
new file mode 100644
index 00000000000..d9c97d25184
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/build.properties
@@ -0,0 +1,20 @@
+# Copyright (c) 2012 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+#
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src-gen/,\
+ src/
+output.. = bin/
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/model/papyrustable.ecore b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/model/papyrustable.ecore
new file mode 100644
index 00000000000..6f7a7ac8352
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/model/papyrustable.ecore
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage 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" name="papyrustable" nsURI="http://www.eclipse.org/Papyrus/PapyrusTable/0.9.0/papyrustable"
+ nsPrefix="papyrustable">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This package contains the model used to store the Papyrus Table."/>
+ </eAnnotations>
+ <eClassifiers xsi:type="ecore:EClass" name="PapyrusTable" eSuperTypes="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This element represents the tables used in Papyrus."/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This field allows to store a name for the Papyrus Table."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This field allows to store the type of the Papyrus Table. It is used to know how &#xD;&#xA;to open it in the papyrus sasheditor."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="table" eType="ecore:EClass ../../org.eclipse.emf.facet.widgets.table.metamodel/model/table-0.2.0.ecore#//Table"
+ containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This field reference the EMF-Facet table that we use for the papyrus Table.&#xD;&#xA;We choose to reference it (and not to do an inheritance) in order to be sure&#xD;&#xA;to respect their API."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="fillingMode" eType="#//FillingMode">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This attribute allows to store how the table should be filled."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="contextFeature" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EReference">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This field references the EStructuralFeature to listen when the table is in Feature Mode."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="queries" upperBound="-1"
+ eType="ecore:EClass ../../org.eclipse.emf.facet.efacet.metamodel/model/efacet-0.2.0.ecore#//extensible/Query">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This field references the queries used to fill table when the table is in queries mode."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="usingUser" ordered="false"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" changeable="false"
+ volatile="true" transient="true" derived="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This attribute is true when fillingMode==User."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="usingContextFeature" ordered="false"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" changeable="false"
+ volatile="true" transient="true" derived="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This attribute is true when fillingMode==Feature."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="usingQueries" ordered="false"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" changeable="false"
+ volatile="true" derived="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This attribute is true when fillingMode==Queries."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="FillingMode">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This enumeration provides literals representing the ways to fill the table."/>
+ </eAnnotations>
+ <eLiterals name="User" literal="USER">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This user drops the elements to fill the table."/>
+ </eAnnotations>
+ </eLiterals>
+ <eLiterals name="Queries" value="1" literal="QUERIES">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="We use queries to fill the table."/>
+ </eAnnotations>
+ </eLiterals>
+ <eLiterals name="ContextFeature" value="2" literal="CONTEXT_FEATURE">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="We listen a feature of the context of the table to fill it."/>
+ </eAnnotations>
+ </eLiterals>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/model/papyrustable.genmodel b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/model/papyrustable.genmodel
new file mode 100644
index 00000000000..c7baf47b598
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/model/papyrustable.genmodel
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2011 CEA LIST.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation"
+ modelDirectory="/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen" editDirectory="/org.eclipse.papyrus.infra.table.efacet.metamodel.edit/src-gen"
+ editorDirectory="/org.eclipse.papyrus.infra.table.efacet.metamodel.editor/src-gen"
+ modelPluginID="org.eclipse.papyrus.infra.table.efacet.metamodel" modelName="Papyrustable"
+ editPluginClass="org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.provider.PapyrustableEditPlugin"
+ editorPluginClass="org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.presentation.PapyrustableEditorPlugin"
+ nonNLSMarkers="true" testSuiteClass="org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.tests.PapyrustableAllTests"
+ importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" copyrightFields="false"
+ editPluginID="org.eclipse.papyrus.infra.table.efacet.metamodel.edit" editorPluginID="org.eclipse.papyrus.infra.table.efacet.metamodel.editor"
+ usedGenPackages="platform:/plugin/org.eclipse.emf.facet.widgets.celleditors/model/celleditors.genmodel#//modelCellEditor platform:/plugin/org.eclipse.emf.facet.custom.metamodel/model/custom-0.2.0.genmodel#//custom platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore platform:/plugin/org.eclipse.emf.facet.efacet.metamodel/model/efacet-0.2.0.genmodel#//efacet platform:/plugin/org.eclipse.emf.facet.widgets.table.metamodel/model/tableConfiguration-0.2.0.genmodel#//tableconfiguration platform:/plugin/org.eclipse.emf.facet.widgets.table.metamodel/model/table-0.2.0.genmodel#//table">
+ <foreignModel>papyrustable.ecore</foreignModel>
+ <genPackages prefix="Papyrustable" basePackage="org.eclipse.papyrus.infra.table.efacet.metamodel"
+ disposableProviderFactory="true" ecorePackage="papyrustable.ecore#/">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="papyrustable.ecore#//FillingMode">
+ <genEnumLiterals ecoreEnumLiteral="papyrustable.ecore#//FillingMode/User"/>
+ <genEnumLiterals ecoreEnumLiteral="papyrustable.ecore#//FillingMode/Queries"/>
+ <genEnumLiterals ecoreEnumLiteral="papyrustable.ecore#//FillingMode/ContextFeature"/>
+ </genEnums>
+ <genClasses ecoreClass="papyrustable.ecore#//PapyrusTable" labelFeature="#//papyrustable/PapyrusTable/name">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute papyrustable.ecore#//PapyrusTable/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute papyrustable.ecore#//PapyrusTable/type"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference papyrustable.ecore#//PapyrusTable/table"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute papyrustable.ecore#//PapyrusTable/fillingMode"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference papyrustable.ecore#//PapyrusTable/feature"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference papyrustable.ecore#//PapyrusTable/queries"/>
+ <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute papyrustable.ecore#//PapyrusTable/usingUser"/>
+ <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute papyrustable.ecore#//PapyrusTable/usingContextFeature"/>
+ <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute papyrustable.ecore#//PapyrusTable/usingQueries"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/plugin.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/plugin.properties
new file mode 100644
index 00000000000..4d7a0bc0a1a
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/plugin.properties
@@ -0,0 +1,13 @@
+# Copyright (c) 2012 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+#
+
+pluginName = Papyrustableinstance2 Model
+providerName = www.example.org
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/plugin.xml b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/plugin.xml
new file mode 100644
index 00000000000..1051ba704ec
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/plugin.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2012 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+
+-->
+
+<plugin>
+ <extension
+ point="org.eclipse.emf.ecore.generated_package">
+ <package
+ class="org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrustablePackageImpl"
+ genModel="model/papyrustable.genmodel"
+ uri="http://www.eclipse.org/Papyrus/PapyrusTable/0.9.0/papyrustable">
+ </package>
+ </extension>
+
+
+
+</plugin>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/FillingMode.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/FillingMode.java
new file mode 100644
index 00000000000..3272be3c96b
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/FillingMode.java
@@ -0,0 +1,245 @@
+/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Filling Mode</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This enumeration provides literals representing the ways to fill the table.
+ * <!-- end-model-doc -->
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage#getFillingMode()
+ * @model
+ * @generated
+ */
+public enum FillingMode implements Enumerator {
+ /**
+ * The '<em><b>User</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #USER_VALUE
+ * @generated
+ * @ordered
+ */
+ USER(0, "User", "USER"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>Queries</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #QUERIES_VALUE
+ * @generated
+ * @ordered
+ */
+ QUERIES(1, "Queries", "QUERIES"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>Context Feature</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #CONTEXT_FEATURE_VALUE
+ * @generated
+ * @ordered
+ */
+ CONTEXT_FEATURE(2, "ContextFeature", "CONTEXT_FEATURE"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>User</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This user drops the elements to fill the table.
+ * <!-- end-model-doc -->
+ * @see #USER
+ * @model name="User" literal="USER"
+ * @generated
+ * @ordered
+ */
+ public static final int USER_VALUE = 0;
+
+ /**
+ * The '<em><b>Queries</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * We use queries to fill the table.
+ * <!-- end-model-doc -->
+ * @see #QUERIES
+ * @model name="Queries" literal="QUERIES"
+ * @generated
+ * @ordered
+ */
+ public static final int QUERIES_VALUE = 1;
+
+ /**
+ * The '<em><b>Context Feature</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * We listen a feature of the context of the table to fill it.
+ * <!-- end-model-doc -->
+ * @see #CONTEXT_FEATURE
+ * @model name="ContextFeature" literal="CONTEXT_FEATURE"
+ * @generated
+ * @ordered
+ */
+ public static final int CONTEXT_FEATURE_VALUE = 2;
+
+ /**
+ * An array of all the '<em><b>Filling Mode</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final FillingMode[] VALUES_ARRAY =
+ new FillingMode[] {
+ USER,
+ QUERIES,
+ CONTEXT_FEATURE,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Filling Mode</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<FillingMode> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Filling Mode</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static FillingMode get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ FillingMode result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Filling Mode</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static FillingMode getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ FillingMode result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Filling Mode</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static FillingMode get(int value) {
+ switch (value) {
+ case USER_VALUE: return USER;
+ case QUERIES_VALUE: return QUERIES;
+ case CONTEXT_FEATURE_VALUE: return CONTEXT_FEATURE;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private FillingMode(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //FillingMode
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/PapyrusTable.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/PapyrusTable.java
new file mode 100644
index 00000000000..07f12fd5b0e
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/PapyrusTable.java
@@ -0,0 +1,238 @@
+/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.Query;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Table;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Papyrus Table</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This element represents the tables used in Papyrus.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getTable <em>Table</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getFillingMode <em>Filling Mode</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getContextFeature <em>Context Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getQueries <em>Queries</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#isUsingUser <em>Using User</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#isUsingContextFeature <em>Using Context Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#isUsingQueries <em>Using Queries</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable()
+ * @model
+ * @generated
+ */
+public interface PapyrusTable extends EModelElement {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This field allows to store a name for the Papyrus Table.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This field allows to store the type of the Papyrus Table. It is used to know how
+ * to open it in the papyrus sasheditor.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Type</em>' attribute.
+ * @see #setType(String)
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_Type()
+ * @model
+ * @generated
+ */
+ String getType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getType <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Type</em>' attribute.
+ * @see #getType()
+ * @generated
+ */
+ void setType(String value);
+
+ /**
+ * Returns the value of the '<em><b>Table</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This field reference the EMF-Facet table that we use for the papyrus Table.
+ * We choose to reference it (and not to do an inheritance) in order to be sure
+ * to respect their API.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Table</em>' containment reference.
+ * @see #setTable(Table)
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_Table()
+ * @model containment="true"
+ * @generated
+ */
+ Table getTable();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getTable <em>Table</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Table</em>' containment reference.
+ * @see #getTable()
+ * @generated
+ */
+ void setTable(Table value);
+
+ /**
+ * Returns the value of the '<em><b>Filling Mode</b></em>' attribute.
+ * The literals are from the enumeration {@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This attribute allows to store how the table should be filled.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Filling Mode</em>' attribute.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode
+ * @see #setFillingMode(FillingMode)
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_FillingMode()
+ * @model
+ * @generated
+ */
+ FillingMode getFillingMode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getFillingMode <em>Filling Mode</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Filling Mode</em>' attribute.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode
+ * @see #getFillingMode()
+ * @generated
+ */
+ void setFillingMode(FillingMode value);
+
+ /**
+ * Returns the value of the '<em><b>Context Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This field references the EStructuralFeature to listen when the table is in Feature Mode.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Context Feature</em>' reference.
+ * @see #setContextFeature(EReference)
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_ContextFeature()
+ * @model
+ * @generated
+ */
+ EReference getContextFeature();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getContextFeature <em>Context Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Context Feature</em>' reference.
+ * @see #getContextFeature()
+ * @generated
+ */
+ void setContextFeature(EReference value);
+
+ /**
+ * Returns the value of the '<em><b>Queries</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.Query}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This field references the queries used to fill table when the table is in queries mode.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Queries</em>' reference list.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_Queries()
+ * @model
+ * @generated
+ */
+ EList<Query> getQueries();
+
+ /**
+ * Returns the value of the '<em><b>Using User</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This attribute is true when fillingMode==User.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Using User</em>' attribute.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_UsingUser()
+ * @model transient="true" changeable="false" volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ boolean isUsingUser();
+
+ /**
+ * Returns the value of the '<em><b>Using Context Feature</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This attribute is true when fillingMode==Feature.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Using Context Feature</em>' attribute.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_UsingContextFeature()
+ * @model transient="true" changeable="false" volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ boolean isUsingContextFeature();
+
+ /**
+ * Returns the value of the '<em><b>Using Queries</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This attribute is true when fillingMode==Queries.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Using Queries</em>' attribute.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage#getPapyrusTable_UsingQueries()
+ * @model changeable="false" volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ boolean isUsingQueries();
+
+} // PapyrusTable
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/PapyrustableFactory.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/PapyrustableFactory.java
new file mode 100644
index 00000000000..fe05e7f7a47
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/PapyrustableFactory.java
@@ -0,0 +1,52 @@
+/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage
+ * @generated
+ */
+public interface PapyrustableFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ PapyrustableFactory eINSTANCE = org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrustableFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Papyrus Table</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Papyrus Table</em>'.
+ * @generated
+ */
+ PapyrusTable createPapyrusTable();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ PapyrustablePackage getPapyrustablePackage();
+
+} //PapyrustableFactory
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/PapyrustablePackage.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/PapyrustablePackage.java
new file mode 100644
index 00000000000..c5e802dcef3
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/PapyrustablePackage.java
@@ -0,0 +1,428 @@
+/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This package contains the model used to store the Papyrus Table.
+ * <!-- end-model-doc -->
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustableFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface PapyrustablePackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "papyrustable"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/Papyrus/PapyrusTable/0.9.0/papyrustable"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "papyrustable"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ PapyrustablePackage eINSTANCE = org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrustablePackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrusTableImpl <em>Papyrus Table</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrusTableImpl
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrustablePackageImpl#getPapyrusTable()
+ * @generated
+ */
+ int PAPYRUS_TABLE = 0;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__EANNOTATIONS = EcorePackage.EMODEL_ELEMENT__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__NAME = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__TYPE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Table</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__TABLE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Filling Mode</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__FILLING_MODE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Context Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__CONTEXT_FEATURE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Queries</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__QUERIES = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>Using User</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__USING_USER = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 6;
+
+ /**
+ * The feature id for the '<em><b>Using Context Feature</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__USING_CONTEXT_FEATURE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 7;
+
+ /**
+ * The feature id for the '<em><b>Using Queries</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__USING_QUERIES = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 8;
+
+ /**
+ * The number of structural features of the '<em>Papyrus Table</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE_FEATURE_COUNT = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 9;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode <em>Filling Mode</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrustablePackageImpl#getFillingMode()
+ * @generated
+ */
+ int FILLING_MODE = 1;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable <em>Papyrus Table</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Papyrus Table</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable
+ * @generated
+ */
+ EClass getPapyrusTable();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getName()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EAttribute getPapyrusTable_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Type</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getType()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EAttribute getPapyrusTable_Type();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getTable <em>Table</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Table</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getTable()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EReference getPapyrusTable_Table();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getFillingMode <em>Filling Mode</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Filling Mode</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getFillingMode()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EAttribute getPapyrusTable_FillingMode();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getContextFeature <em>Context Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Context Feature</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getContextFeature()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EReference getPapyrusTable_ContextFeature();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getQueries <em>Queries</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Queries</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#getQueries()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EReference getPapyrusTable_Queries();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#isUsingUser <em>Using User</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Using User</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#isUsingUser()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EAttribute getPapyrusTable_UsingUser();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#isUsingContextFeature <em>Using Context Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Using Context Feature</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#isUsingContextFeature()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EAttribute getPapyrusTable_UsingContextFeature();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#isUsingQueries <em>Using Queries</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Using Queries</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable#isUsingQueries()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EAttribute getPapyrusTable_UsingQueries();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode <em>Filling Mode</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Filling Mode</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode
+ * @generated
+ */
+ EEnum getFillingMode();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ PapyrustableFactory getPapyrustableFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrusTableImpl <em>Papyrus Table</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrusTableImpl
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrustablePackageImpl#getPapyrusTable()
+ * @generated
+ */
+ EClass PAPYRUS_TABLE = eINSTANCE.getPapyrusTable();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TABLE__NAME = eINSTANCE.getPapyrusTable_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TABLE__TYPE = eINSTANCE.getPapyrusTable_Type();
+
+ /**
+ * The meta object literal for the '<em><b>Table</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_TABLE__TABLE = eINSTANCE.getPapyrusTable_Table();
+
+ /**
+ * The meta object literal for the '<em><b>Filling Mode</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TABLE__FILLING_MODE = eINSTANCE.getPapyrusTable_FillingMode();
+
+ /**
+ * The meta object literal for the '<em><b>Context Feature</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_TABLE__CONTEXT_FEATURE = eINSTANCE.getPapyrusTable_ContextFeature();
+
+ /**
+ * The meta object literal for the '<em><b>Queries</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_TABLE__QUERIES = eINSTANCE.getPapyrusTable_Queries();
+
+ /**
+ * The meta object literal for the '<em><b>Using User</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TABLE__USING_USER = eINSTANCE.getPapyrusTable_UsingUser();
+
+ /**
+ * The meta object literal for the '<em><b>Using Context Feature</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TABLE__USING_CONTEXT_FEATURE = eINSTANCE.getPapyrusTable_UsingContextFeature();
+
+ /**
+ * The meta object literal for the '<em><b>Using Queries</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TABLE__USING_QUERIES = eINSTANCE.getPapyrusTable_UsingQueries();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode <em>Filling Mode</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrustablePackageImpl#getFillingMode()
+ * @generated
+ */
+ EEnum FILLING_MODE = eINSTANCE.getFillingMode();
+
+ }
+
+} //PapyrustablePackage
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/impl/PapyrusTableImpl.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/impl/PapyrusTableImpl.java
new file mode 100644
index 00000000000..91ccee26ef9
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/impl/PapyrusTableImpl.java
@@ -0,0 +1,537 @@
+/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.EModelElementImpl;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.Query;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Table;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Papyrus Table</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrusTableImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrusTableImpl#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrusTableImpl#getTable <em>Table</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrusTableImpl#getFillingMode <em>Filling Mode</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrusTableImpl#getContextFeature <em>Context Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrusTableImpl#getQueries <em>Queries</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrusTableImpl#isUsingUser <em>Using User</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrusTableImpl#isUsingContextFeature <em>Using Context Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl.PapyrusTableImpl#isUsingQueries <em>Using Queries</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PapyrusTableImpl extends EModelElementImpl implements PapyrusTable {
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected static final String TYPE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected String type = TYPE_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getTable() <em>Table</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTable()
+ * @generated
+ * @ordered
+ */
+ protected Table table;
+
+ /**
+ * The default value of the '{@link #getFillingMode() <em>Filling Mode</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFillingMode()
+ * @generated
+ * @ordered
+ */
+ protected static final FillingMode FILLING_MODE_EDEFAULT = FillingMode.USER;
+
+ /**
+ * The cached value of the '{@link #getFillingMode() <em>Filling Mode</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFillingMode()
+ * @generated
+ * @ordered
+ */
+ protected FillingMode fillingMode = FILLING_MODE_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getContextFeature() <em>Context Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getContextFeature()
+ * @generated
+ * @ordered
+ */
+ protected EReference contextFeature;
+
+ /**
+ * The cached value of the '{@link #getQueries() <em>Queries</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getQueries()
+ * @generated
+ * @ordered
+ */
+ protected EList<Query> queries;
+
+ /**
+ * The default value of the '{@link #isUsingUser() <em>Using User</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isUsingUser()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean USING_USER_EDEFAULT = false;
+
+ /**
+ * The default value of the '{@link #isUsingContextFeature() <em>Using Context Feature</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isUsingContextFeature()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean USING_CONTEXT_FEATURE_EDEFAULT = false;
+
+ /**
+ * The default value of the '{@link #isUsingQueries() <em>Using Queries</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isUsingQueries()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean USING_QUERIES_EDEFAULT = false;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusTableImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PapyrustablePackage.Literals.PAPYRUS_TABLE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustablePackage.PAPYRUS_TABLE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(String newType) {
+ String oldType = type;
+ type = newType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustablePackage.PAPYRUS_TABLE__TYPE, oldType, type));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Table getTable() {
+ return table;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetTable(Table newTable, NotificationChain msgs) {
+ Table oldTable = table;
+ table = newTable;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PapyrustablePackage.PAPYRUS_TABLE__TABLE, oldTable, newTable);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTable(Table newTable) {
+ if (newTable != table) {
+ NotificationChain msgs = null;
+ if (table != null)
+ msgs = ((InternalEObject)table).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PapyrustablePackage.PAPYRUS_TABLE__TABLE, null, msgs);
+ if (newTable != null)
+ msgs = ((InternalEObject)newTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PapyrustablePackage.PAPYRUS_TABLE__TABLE, null, msgs);
+ msgs = basicSetTable(newTable, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustablePackage.PAPYRUS_TABLE__TABLE, newTable, newTable));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FillingMode getFillingMode() {
+ return fillingMode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFillingMode(FillingMode newFillingMode) {
+ FillingMode oldFillingMode = fillingMode;
+ fillingMode = newFillingMode == null ? FILLING_MODE_EDEFAULT : newFillingMode;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustablePackage.PAPYRUS_TABLE__FILLING_MODE, oldFillingMode, fillingMode));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getContextFeature() {
+ if (contextFeature != null && contextFeature.eIsProxy()) {
+ InternalEObject oldContextFeature = (InternalEObject)contextFeature;
+ contextFeature = (EReference)eResolveProxy(oldContextFeature);
+ if (contextFeature != oldContextFeature) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PapyrustablePackage.PAPYRUS_TABLE__CONTEXT_FEATURE, oldContextFeature, contextFeature));
+ }
+ }
+ return contextFeature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference basicGetContextFeature() {
+ return contextFeature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setContextFeature(EReference newContextFeature) {
+ EReference oldContextFeature = contextFeature;
+ contextFeature = newContextFeature;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustablePackage.PAPYRUS_TABLE__CONTEXT_FEATURE, oldContextFeature, contextFeature));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Query> getQueries() {
+ if (queries == null) {
+ queries = new EObjectResolvingEList<Query>(Query.class, this, PapyrustablePackage.PAPYRUS_TABLE__QUERIES);
+ }
+ return queries;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean isUsingUser() {
+ return this.fillingMode.getValue() == FillingMode.USER_VALUE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean isUsingContextFeature() {
+ return this.fillingMode.getValue() == FillingMode.CONTEXT_FEATURE_VALUE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean isUsingQueries() {
+ return this.fillingMode.getValue() == FillingMode.QUERIES_VALUE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PapyrustablePackage.PAPYRUS_TABLE__TABLE:
+ return basicSetTable(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PapyrustablePackage.PAPYRUS_TABLE__NAME:
+ return getName();
+ case PapyrustablePackage.PAPYRUS_TABLE__TYPE:
+ return getType();
+ case PapyrustablePackage.PAPYRUS_TABLE__TABLE:
+ return getTable();
+ case PapyrustablePackage.PAPYRUS_TABLE__FILLING_MODE:
+ return getFillingMode();
+ case PapyrustablePackage.PAPYRUS_TABLE__CONTEXT_FEATURE:
+ if (resolve) return getContextFeature();
+ return basicGetContextFeature();
+ case PapyrustablePackage.PAPYRUS_TABLE__QUERIES:
+ return getQueries();
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_USER:
+ return isUsingUser();
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_CONTEXT_FEATURE:
+ return isUsingContextFeature();
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_QUERIES:
+ return isUsingQueries();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PapyrustablePackage.PAPYRUS_TABLE__NAME:
+ setName((String)newValue);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__TYPE:
+ setType((String)newValue);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__TABLE:
+ setTable((Table)newValue);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__FILLING_MODE:
+ setFillingMode((FillingMode)newValue);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__CONTEXT_FEATURE:
+ setContextFeature((EReference)newValue);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__QUERIES:
+ getQueries().clear();
+ getQueries().addAll((Collection<? extends Query>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PapyrustablePackage.PAPYRUS_TABLE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__TYPE:
+ setType(TYPE_EDEFAULT);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__TABLE:
+ setTable((Table)null);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__FILLING_MODE:
+ setFillingMode(FILLING_MODE_EDEFAULT);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__CONTEXT_FEATURE:
+ setContextFeature((EReference)null);
+ return;
+ case PapyrustablePackage.PAPYRUS_TABLE__QUERIES:
+ getQueries().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PapyrustablePackage.PAPYRUS_TABLE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case PapyrustablePackage.PAPYRUS_TABLE__TYPE:
+ return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
+ case PapyrustablePackage.PAPYRUS_TABLE__TABLE:
+ return table != null;
+ case PapyrustablePackage.PAPYRUS_TABLE__FILLING_MODE:
+ return fillingMode != FILLING_MODE_EDEFAULT;
+ case PapyrustablePackage.PAPYRUS_TABLE__CONTEXT_FEATURE:
+ return contextFeature != null;
+ case PapyrustablePackage.PAPYRUS_TABLE__QUERIES:
+ return queries != null && !queries.isEmpty();
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_USER:
+ return isUsingUser() != USING_USER_EDEFAULT;
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_CONTEXT_FEATURE:
+ return isUsingContextFeature() != USING_CONTEXT_FEATURE_EDEFAULT;
+ case PapyrustablePackage.PAPYRUS_TABLE__USING_QUERIES:
+ return isUsingQueries() != USING_QUERIES_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: "); //$NON-NLS-1$
+ result.append(name);
+ result.append(", type: "); //$NON-NLS-1$
+ result.append(type);
+ result.append(", fillingMode: "); //$NON-NLS-1$
+ result.append(fillingMode);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PapyrusTableImpl
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/impl/PapyrustableFactoryImpl.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/impl/PapyrustableFactoryImpl.java
new file mode 100644
index 00000000000..7235c551f2d
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/impl/PapyrustableFactoryImpl.java
@@ -0,0 +1,156 @@
+/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustableFactory;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrustableFactoryImpl extends EFactoryImpl implements PapyrustableFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static PapyrustableFactory init() {
+ try {
+ PapyrustableFactory thePapyrustableFactory = (PapyrustableFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/Papyrus/PapyrusTable/0.9.0/papyrustable"); //$NON-NLS-1$
+ if (thePapyrustableFactory != null) {
+ return thePapyrustableFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new PapyrustableFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustableFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case PapyrustablePackage.PAPYRUS_TABLE: return createPapyrusTable();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case PapyrustablePackage.FILLING_MODE:
+ return createFillingModeFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case PapyrustablePackage.FILLING_MODE:
+ return convertFillingModeToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusTable createPapyrusTable() {
+ PapyrusTableImpl papyrusTable = new PapyrusTableImpl();
+ return papyrusTable;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FillingMode createFillingModeFromString(EDataType eDataType, String initialValue) {
+ FillingMode result = FillingMode.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertFillingModeToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustablePackage getPapyrustablePackage() {
+ return (PapyrustablePackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static PapyrustablePackage getPackage() {
+ return PapyrustablePackage.eINSTANCE;
+ }
+
+} //PapyrustableFactoryImpl
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/impl/PapyrustablePackageImpl.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/impl/PapyrustablePackageImpl.java
new file mode 100644
index 00000000000..886754dec48
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/impl/PapyrustablePackageImpl.java
@@ -0,0 +1,313 @@
+/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.ExtensiblePackage;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.TablePackage;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustableFactory;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrustablePackageImpl extends EPackageImpl implements PapyrustablePackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass papyrusTableEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum fillingModeEEnum = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private PapyrustablePackageImpl() {
+ super(eNS_URI, PapyrustableFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link PapyrustablePackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static PapyrustablePackage init() {
+ if (isInited) return (PapyrustablePackage)EPackage.Registry.INSTANCE.getEPackage(PapyrustablePackage.eNS_URI);
+
+ // Obtain or create and register package
+ PapyrustablePackageImpl thePapyrustablePackage = (PapyrustablePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PapyrustablePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PapyrustablePackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ TablePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ thePapyrustablePackage.createPackageContents();
+
+ // Initialize created meta-data
+ thePapyrustablePackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ thePapyrustablePackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(PapyrustablePackage.eNS_URI, thePapyrustablePackage);
+ return thePapyrustablePackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPapyrusTable() {
+ return papyrusTableEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTable_Name() {
+ return (EAttribute)papyrusTableEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTable_Type() {
+ return (EAttribute)papyrusTableEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusTable_Table() {
+ return (EReference)papyrusTableEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTable_FillingMode() {
+ return (EAttribute)papyrusTableEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusTable_ContextFeature() {
+ return (EReference)papyrusTableEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusTable_Queries() {
+ return (EReference)papyrusTableEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTable_UsingUser() {
+ return (EAttribute)papyrusTableEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTable_UsingContextFeature() {
+ return (EAttribute)papyrusTableEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTable_UsingQueries() {
+ return (EAttribute)papyrusTableEClass.getEStructuralFeatures().get(8);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getFillingMode() {
+ return fillingModeEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustableFactory getPapyrustableFactory() {
+ return (PapyrustableFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ papyrusTableEClass = createEClass(PAPYRUS_TABLE);
+ createEAttribute(papyrusTableEClass, PAPYRUS_TABLE__NAME);
+ createEAttribute(papyrusTableEClass, PAPYRUS_TABLE__TYPE);
+ createEReference(papyrusTableEClass, PAPYRUS_TABLE__TABLE);
+ createEAttribute(papyrusTableEClass, PAPYRUS_TABLE__FILLING_MODE);
+ createEReference(papyrusTableEClass, PAPYRUS_TABLE__CONTEXT_FEATURE);
+ createEReference(papyrusTableEClass, PAPYRUS_TABLE__QUERIES);
+ createEAttribute(papyrusTableEClass, PAPYRUS_TABLE__USING_USER);
+ createEAttribute(papyrusTableEClass, PAPYRUS_TABLE__USING_CONTEXT_FEATURE);
+ createEAttribute(papyrusTableEClass, PAPYRUS_TABLE__USING_QUERIES);
+
+ // Create enums
+ fillingModeEEnum = createEEnum(FILLING_MODE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+ TablePackage theTablePackage = (TablePackage)EPackage.Registry.INSTANCE.getEPackage(TablePackage.eNS_URI);
+ ExtensiblePackage theExtensiblePackage = (ExtensiblePackage)EPackage.Registry.INSTANCE.getEPackage(ExtensiblePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ papyrusTableEClass.getESuperTypes().add(theEcorePackage.getEModelElement());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(papyrusTableEClass, PapyrusTable.class, "PapyrusTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getPapyrusTable_Name(), ecorePackage.getEString(), "name", null, 0, 1, PapyrusTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getPapyrusTable_Type(), ecorePackage.getEString(), "type", null, 0, 1, PapyrusTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPapyrusTable_Table(), theTablePackage.getTable(), null, "table", null, 0, 1, PapyrusTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getPapyrusTable_FillingMode(), this.getFillingMode(), "fillingMode", null, 0, 1, PapyrusTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPapyrusTable_ContextFeature(), ecorePackage.getEReference(), null, "contextFeature", null, 0, 1, PapyrusTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPapyrusTable_Queries(), theExtensiblePackage.getQuery(), null, "queries", null, 0, -1, PapyrusTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getPapyrusTable_UsingUser(), ecorePackage.getEBoolean(), "usingUser", null, 0, 1, PapyrusTable.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getPapyrusTable_UsingContextFeature(), ecorePackage.getEBoolean(), "usingContextFeature", null, 0, 1, PapyrusTable.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getPapyrusTable_UsingQueries(), ecorePackage.getEBoolean(), "usingQueries", null, 0, 1, PapyrusTable.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
+
+ // Initialize enums and add enum literals
+ initEEnum(fillingModeEEnum, FillingMode.class, "FillingMode"); //$NON-NLS-1$
+ addEEnumLiteral(fillingModeEEnum, FillingMode.USER);
+ addEEnumLiteral(fillingModeEEnum, FillingMode.QUERIES);
+ addEEnumLiteral(fillingModeEEnum, FillingMode.CONTEXT_FEATURE);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //PapyrustablePackageImpl
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/util/PapyrustableAdapterFactory.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/util/PapyrustableAdapterFactory.java
new file mode 100644
index 00000000000..3e5c02e1501
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/util/PapyrustableAdapterFactory.java
@@ -0,0 +1,147 @@
+/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage
+ * @generated
+ */
+public class PapyrustableAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static PapyrustablePackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustableAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = PapyrustablePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrustableSwitch<Adapter> modelSwitch =
+ new PapyrustableSwitch<Adapter>() {
+ @Override
+ public Adapter casePapyrusTable(PapyrusTable object) {
+ return createPapyrusTableAdapter();
+ }
+ @Override
+ public Adapter caseEModelElement(EModelElement object) {
+ return createEModelElementAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable <em>Papyrus Table</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable
+ * @generated
+ */
+ public Adapter createPapyrusTableAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EModelElement <em>EModel Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.ecore.EModelElement
+ * @generated
+ */
+ public Adapter createEModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //PapyrustableAdapterFactory
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/util/PapyrustableSwitch.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/util/PapyrustableSwitch.java
new file mode 100644
index 00000000000..418716043ff
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/util/PapyrustableSwitch.java
@@ -0,0 +1,136 @@
+/**
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.util;
+
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage
+ * @generated
+ */
+public class PapyrustableSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static PapyrustablePackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustableSwitch() {
+ if (modelPackage == null) {
+ modelPackage = PapyrustablePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case PapyrustablePackage.PAPYRUS_TABLE: {
+ PapyrusTable papyrusTable = (PapyrusTable)theEObject;
+ T result = casePapyrusTable(papyrusTable);
+ if (result == null) result = caseEModelElement(papyrusTable);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Papyrus Table</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Papyrus Table</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePapyrusTable(PapyrusTable object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EModel Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EModel Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEModelElement(EModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //PapyrustableSwitch
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/TableContentsUtils.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/TableContentsUtils.java
new file mode 100644
index 00000000000..402cc889818
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.metamodel/src/org/eclipse/papyrus/infra/table/efacet/metamodel/papyrustable/TableContentsUtils.java
@@ -0,0 +1,79 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.Row;
+
+
+public class TableContentsUtils {
+
+
+ private TableContentsUtils() {
+ //to prevent instanciation
+ }
+
+ /**
+ *
+ * @param papyrusTable
+ * the table to analyse
+ * @param synchronizedContent
+ * <li>if <code>true</code> the method returns the list of the elements which should be contained by the table (using the queries or the
+ * features)</li> <li>if <code>false</code> the method returns the list of the elements currently contained by the table (we use the
+ * serialized table)</li>
+ * @return
+ */
+ public static final List<EObject> getTableContents(final PapyrusTable papyrusTable, final EObject tableContext, final boolean synchronizedContent) {
+ final List<EObject> result = new LinkedList<EObject>();
+ if(synchronizedContent && !papyrusTable.isUsingUser()) {
+ if(papyrusTable.isUsingContextFeature()) {
+ final EReference feature = papyrusTable.getContextFeature();
+ Object value = null;
+ try {
+ value = tableContext.eGet(feature);
+ } catch (final Exception e) {
+ //nothing to do
+ }
+ // if(value == null) {//teh feature has not been found
+ // final EStructuralFeature matchingFeature = tableContext.eClass().getEStructuralFeature(feature.getName());
+ // if(matchingFeature != null) {
+ // value = tableContext.eGet(matchingFeature);
+ // }
+ //
+ // }
+
+
+ if(value instanceof List<?>) {
+ result.addAll((List<EObject>)value);
+ } else if(value instanceof EObject) {
+ result.add((EObject)value);
+ }
+ } else if(papyrusTable.isUsingQueries()) {
+ //TODO
+ }
+ } else {
+ //duplicated code from TableWidgetUtils#public static List<EObject> getElements(final Table tableInstance) {
+ //TODO ask to Mia-Software to change this method in a upper plugin to avoid dependencies on UI
+ if(papyrusTable.getTable() != null) {
+ for(final Row row : papyrusTable.getTable().getRows()) {
+ result.add(row.getElement());
+ }
+ }
+ }
+ return result;
+ }
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/.classpath b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/.project b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/.project
new file mode 100644
index 00000000000..80a28e8b68d
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.table.efacet.modelexplorer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/.settings/org.eclipse.jdt.core.prefs b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/META-INF/MANIFEST.MF b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..15b77fb2876
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.emf.ecore,
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.table.efacet.metamodel;bundle-version="0.10.1",
+ org.eclipse.emf.transaction,
+ org.eclipse.gmf.runtime.emf.type.core,
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="0.10.1"
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.10.1.qualifier
+Bundle-Name: EFacetTable Modelexplorer (Incubation)
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.table.efacet.modelexplorer
+ .Activator
+Bundle-SymbolicName: org.eclipse.papyrus.infra.table.efacet.modelexplo
+ rer;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/build.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/build.properties
new file mode 100644
index 00000000000..6f20375d6c7
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/plugin.xml b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/plugin.xml
new file mode 100644
index 00000000000..73413a251b4
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/plugin.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+<extension point="org.eclipse.ui.handlers">
+ <handler class="org.eclipse.papyrus.infra.table.efacet.modelexplorer.handlers.DeleteTableEFacetHandler" commandId="org.eclipse.ui.edit.delete">
+ </handler>
+ <handler class="org.eclipse.papyrus.infra.table.efacet.modelexplorer.handlers.DuplicateTableEFacetHandler" commandId="org.eclipse.papyrus.views.modelexplorer.duplicate.command">
+ </handler>
+ <handler class="org.eclipse.papyrus.infra.table.efacet.modelexplorer.handlers.RenameTableEFacetHandler" commandId="org.eclipse.ui.edit.rename">
+ </handler>
+ </extension>
+</plugin>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/Activator.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/Activator.java
new file mode 100644
index 00000000000..8ba19528072
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.papyrus.infra.table.efacet.modelexplorer;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.table.efacet.modelexplorer"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/AbstractTableEFacetHandler.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/AbstractTableEFacetHandler.java
new file mode 100644
index 00000000000..9814e0cb650
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/AbstractTableEFacetHandler.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.table.efacet.modelexplorer.handlers;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.views.modelexplorer.handler.AbstractCommandHandler;
+import org.eclipse.ui.PlatformUI;
+
+
+public abstract class AbstractTableEFacetHandler extends AbstractCommandHandler {
+
+ /**
+ * Returns the list of selected tables
+ *
+ * @return
+ * the list of selected tables
+ */
+ protected List<PapyrusTable> getSelectedTables() {
+ final List<PapyrusTable> tables = new ArrayList<PapyrusTable>();
+ final ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
+
+ // Get first element if the selection is an IStructuredSelection
+ if(selection instanceof IStructuredSelection) {
+ final IStructuredSelection structuredSelection = (IStructuredSelection)selection;
+ final Iterator<?> iter = structuredSelection.iterator();
+ while(iter.hasNext()) {
+ final Object current = iter.next();
+ if(current instanceof IAdaptable) {
+ final EObject table = (EObject)((IAdaptable)current).getAdapter(EObject.class);
+ if(table instanceof PapyrusTable) {
+ tables.add((PapyrusTable)table);
+ }
+ }
+ }
+ }
+ return tables;
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/DeleteTableEFacetHandler.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/DeleteTableEFacetHandler.java
new file mode 100644
index 00000000000..1d41b87c524
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/DeleteTableEFacetHandler.java
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.table.efacet.modelexplorer.handlers;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.papyrus.commands.DestroyElementPapyrusCommand;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageMngr;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+
+/**
+ * Handler for the delete Table action
+ *
+ *
+ *
+ */
+public class DeleteTableEFacetHandler extends AbstractTableEFacetHandler {
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.views.modelexplorer.handler.AbstractCommandHandler#getCommand()
+ *
+ * @return
+ */
+ @Override
+ protected Command getCommand() {
+ final TransactionalEditingDomain editingDomain = getEditingDomain();
+ final IPageMngr pageMngr = getPageManager();
+ final List<PapyrusTable> tables = getSelectedTables();
+
+ if(editingDomain != null && pageMngr != null && !tables.isEmpty()) {
+ final CompoundCommand command = new CompoundCommand();
+
+ for(final PapyrusTable table : tables) {
+ final ECrossReferenceAdapter cross = ECrossReferenceAdapter.getCrossReferenceAdapter(table);
+ final Collection<Setting> ref = cross.getInverseReferences(table);
+ final Command sashRemoveComd = new RecordingCommand(editingDomain) {
+
+ @Override
+ protected void doExecute() {
+ if(pageMngr.allPages().contains(table)) {
+ if(pageMngr.isOpen(table)) {
+ pageMngr.closePage(table);
+ }
+ pageMngr.removePage(table);
+ }
+ }
+ };
+ // the destroy element command is a good way to destroy the cross reference
+ command.append(sashRemoveComd);
+ command.append(new GMFtoEMFCommandWrapper(new DestroyElementPapyrusCommand(new DestroyElementRequest(table, false))));
+ }
+ return command.isEmpty() ? UnexecutableCommand.INSTANCE : command;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/DuplicateTableEFacetHandler.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/DuplicateTableEFacetHandler.java
new file mode 100644
index 00000000000..20ef92a07a9
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/DuplicateTableEFacetHandler.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.table.efacet.modelexplorer.handlers;
+
+import java.util.List;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageMngr;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.infra.table.efacet.modelexplorer.messages.Messages;
+
+/**
+ * This handler provides the duplicate action for the tables
+ *
+ *
+ *
+ */
+public class DuplicateTableEFacetHandler extends AbstractTableEFacetHandler {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.views.modelexplorer.handler.AbstractCommandHandler#getCommand()
+ *
+ * @return
+ */
+ @Override
+ protected Command getCommand() {
+ final TransactionalEditingDomain editingDomain = getEditingDomain();
+ final IPageMngr pageManager = getPageManager();
+ final List<PapyrusTable> tables = getSelectedTables();
+
+ if(editingDomain != null && pageManager != null && !tables.isEmpty()) {
+ final CompoundCommand command = new CompoundCommand();
+ for(final PapyrusTable table : tables) {
+
+ // Clone the current diagram
+ final PapyrusTable newTable = EcoreUtil.copy(table);
+ // Give a new name
+ newTable.setName(NLS.bind(Messages.DuplicateTableEFacetHandler_CopyOf, table.getName()));
+ final Command addGmfDiagramCmd = new AddCommand(editingDomain, table.eResource().getContents(), newTable);
+ // EMFCommandOperation operation = new
+ // EMFCommandOperation(editingDomain,
+ // addGmfDiagramCmd);
+
+ final Command sashOpenComd = new RecordingCommand(editingDomain) {
+
+ @Override
+ protected void doExecute() {
+ pageManager.openPage(newTable);
+ }
+ };
+
+ // TODO : synchronize with Cedric
+ // command.append(operation.getCommand());
+ command.append(addGmfDiagramCmd);
+ command.append(sashOpenComd);
+ }
+ return command.isEmpty() ? UnexecutableCommand.INSTANCE : command;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/RenameTableEFacetHandler.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/RenameTableEFacetHandler.java
new file mode 100644
index 00000000000..c3b09ef2540
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/handlers/RenameTableEFacetHandler.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.table.efacet.modelexplorer.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrusTable;
+import org.eclipse.papyrus.infra.table.efacet.modelexplorer.messages.Messages;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * This handler provides the method to rename a Table
+ *
+ *
+ *
+ */
+public class RenameTableEFacetHandler extends AbstractTableEFacetHandler {
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.views.modelexplorer.handler.AbstractCommandHandler#getCommand()
+ *
+ * @return
+ */
+ @Override
+ protected Command getCommand() {
+ final TransactionalEditingDomain editingDomain = getEditingDomain();
+ final List<PapyrusTable> tables = getSelectedTables();
+ if(editingDomain != null && tables.size() == 1) {
+
+ final PapyrusTable table = tables.get(0);
+ final String currentName = table.getName();
+
+ if(currentName != null) {
+
+ final AbstractTransactionalCommand cmd = new AbstractTransactionalCommand(editingDomain, "Rename EFacetTable", null) { //$NON-NLS-1$
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) {
+ final InputDialog dialog = new InputDialog(Display.getCurrent().getActiveShell(), Messages.RenameTableEFacetHandler_RenameAnExistingTable, Messages.RenameTableEFacetHandler_NewName, currentName, null);
+ if(dialog.open() == Window.OK) {
+ final String name = dialog.getValue();
+ if(name != null && name.length() > 0) {
+ table.setName(name);
+ }
+ return CommandResult.newOKCommandResult();
+ } else {
+ return CommandResult.newCancelledCommandResult();
+ }
+ }
+ };
+ return new GMFtoEMFCommandWrapper(cmd);
+ }
+
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+
+
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/messages/Messages.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/messages/Messages.java
new file mode 100644
index 00000000000..f572ea6465a
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/messages/Messages.java
@@ -0,0 +1,21 @@
+package org.eclipse.papyrus.infra.table.efacet.modelexplorer.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.table.efacet.modelexplorer.messages.messages"; //$NON-NLS-1$
+
+ public static String DuplicateTableEFacetHandler_CopyOf;
+
+ public static String RenameTableEFacetHandler_NewName;
+
+ public static String RenameTableEFacetHandler_RenameAnExistingTable;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/messages/messages.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/messages/messages.properties
new file mode 100644
index 00000000000..cb67e73a298
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.modelexplorer/src/org/eclipse/papyrus/infra/table/efacet/modelexplorer/messages/messages.properties
@@ -0,0 +1,3 @@
+DuplicateTableEFacetHandler_CopyOf=Copy_Of
+RenameTableEFacetHandler_NewName=New name
+RenameTableEFacetHandler_RenameAnExistingTable=Rename an existing table
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/.classpath b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/.classpath
new file mode 100644
index 00000000000..cedf0d0d0b5
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/.project b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/.project
new file mode 100644
index 00000000000..375736a4d75
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/META-INF/MANIFEST.MF b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..110c7b0fba6
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.table.efacet.papyrustablecon
+ figuration.metamodel.papyrustableconfiguration.provider
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel;bundle-version="0.10.1";visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.emf.facet.widgets.celleditors;visibility:=reexport,
+ org.eclipse.emf.facet.widgets.celleditors.edit;visibility:=reexport,
+ org.eclipse.emf.facet.custom.metamodel;visibility:=reexport,
+ org.eclipse.emf.facet.custom.metamodel.edit;visibility:=reexport,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.emf.facet.efacet.metamodel;visibility:=reexport,
+ org.eclipse.emf.facet.efacet.metamodel.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.table.efacet.metamodel;bundle-version="0.10.1";visibility:=reexport,
+ org.eclipse.papyrus.infra.table.efacet.metamodel.edit;bundle-version="0.10.1";visibility:=reexport,
+ org.eclipse.emf.facet.widgets.table.metamodel;visibility:=reexport,
+ org.eclipse.emf.facet.widgets.table.metamodel.edit;visibility:=reexport
+Bundle-Vendor: %providerName
+Bundle-Version: 0.10.1.qualifier
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.table.efacet.papyrustablec
+ onfiguration.metamodel.papyrustableconfiguration.provider.Papyrustabl
+ econfigurationEditPlugin$Implementation
+Bundle-SymbolicName: org.eclipse.papyrus.infra.table.efacet.papyrustab
+ leconfiguration.metamodel.edit;singleton:=true
+
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/build.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/build.properties
new file mode 100644
index 00000000000..2579f63d79f
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/build.properties
@@ -0,0 +1,19 @@
+# Copyright (c) 2012 CEA LIST.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# ttp://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src-gen/
+output.. = bin/
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/icons/full/ctool16/CreatePapyrusTableConfiguration_tableConfiguration_TableConfiguration.gif b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/icons/full/ctool16/CreatePapyrusTableConfiguration_tableConfiguration_TableConfiguration.gif
new file mode 100644
index 00000000000..b72dc20b46f
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/icons/full/ctool16/CreatePapyrusTableConfiguration_tableConfiguration_TableConfiguration.gif
Binary files differ
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/icons/full/obj16/PapyrusTableConfiguration.gif b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/icons/full/obj16/PapyrusTableConfiguration.gif
new file mode 100644
index 00000000000..48e3cf22687
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/icons/full/obj16/PapyrusTableConfiguration.gif
Binary files differ
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/plugin.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/plugin.properties
new file mode 100644
index 00000000000..594cc526064
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/plugin.properties
@@ -0,0 +1,35 @@
+# Copyright (c) 2012 CEA LIST.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# ttp://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+
+pluginName = Papyrustableconfiguration Edit Support
+providerName = www.example.org
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_PapyrusTableConfiguration_type = Papyrus Table Configuration
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_PapyrusTableConfiguration_fillingMode_feature = Filling Mode
+_UI_PapyrusTableConfiguration_fillingQueries_feature = Filling Queries
+_UI_PapyrusTableConfiguration_listenFeature_feature = Listen Feature
+_UI_PapyrusTableConfiguration_tableConfiguration_feature = Table Configuration
+_UI_Unknown_feature = Unspecified
+
+_UI_PapyrusTableConfiguration_listenContextFeature_feature = Listen Context Feature
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/plugin.xml b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/plugin.xml
new file mode 100644
index 00000000000..5f16e24d88d
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/plugin.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2012 CEA LIST.
+
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ ttp://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://www.eclipse.org/Papyrus/PapyrusTableConfiguration/0.9.0/papyrustableconfiguration"
+ class="org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.provider.PapyrustableconfigurationItemProviderAdapterFactory"
+ 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/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/provider/PapyrusTableConfigurationItemProvider.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/provider/PapyrusTableConfigurationItemProvider.java
new file mode 100644
index 00000000000..5fb4b3a6765
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/provider/PapyrusTableConfigurationItemProvider.java
@@ -0,0 +1,250 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * ttp://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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.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.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+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.emf.facet.widgets.table.metamodel.v0_2_0.tableconfiguration.TableconfigurationFactory;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationPackage;
+
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrusTableConfigurationItemProvider 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 PapyrusTableConfigurationItemProvider(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);
+
+ addFillingModePropertyDescriptor(object);
+ addFillingQueriesPropertyDescriptor(object);
+ addListenContextFeaturePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Filling Mode feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addFillingModePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusTableConfiguration_fillingMode_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTableConfiguration_fillingMode_feature", "_UI_PapyrusTableConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PapyrustableconfigurationPackage.Literals.PAPYRUS_TABLE_CONFIGURATION__FILLING_MODE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Filling Queries feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addFillingQueriesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusTableConfiguration_fillingQueries_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTableConfiguration_fillingQueries_feature", "_UI_PapyrusTableConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PapyrustableconfigurationPackage.Literals.PAPYRUS_TABLE_CONFIGURATION__FILLING_QUERIES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Listen Context Feature feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addListenContextFeaturePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusTableConfiguration_listenContextFeature_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTableConfiguration_listenContextFeature_feature", "_UI_PapyrusTableConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PapyrustableconfigurationPackage.Literals.PAPYRUS_TABLE_CONFIGURATION__LISTEN_CONTEXT_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(EcorePackage.Literals.EMODEL_ELEMENT__EANNOTATIONS);
+ childrenFeatures.add(PapyrustableconfigurationPackage.Literals.PAPYRUS_TABLE_CONFIGURATION__TABLE_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 PapyrusTableConfiguration.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PapyrusTableConfiguration")); //$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) {
+ FillingMode labelValue = ((PapyrusTableConfiguration)object).getFillingMode();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ?
+ getString("_UI_PapyrusTableConfiguration_type") : //$NON-NLS-1$
+ getString("_UI_PapyrusTableConfiguration_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(PapyrusTableConfiguration.class)) {
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__FILLING_MODE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__EANNOTATIONS:
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__TABLE_CONFIGURATION:
+ 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
+ (PapyrustableconfigurationPackage.Literals.PAPYRUS_TABLE_CONFIGURATION__TABLE_CONFIGURATION,
+ TableconfigurationFactory.eINSTANCE.createTableConfiguration()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return PapyrustableconfigurationEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/provider/PapyrustableconfigurationEditPlugin.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/provider/PapyrustableconfigurationEditPlugin.java
new file mode 100644
index 00000000000..765aaa13ae5
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/provider/PapyrustableconfigurationEditPlugin.java
@@ -0,0 +1,109 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * ttp://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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.custom.provider.CustomEditPlugin;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.provider.Efacet2EditPlugin;
+import org.eclipse.emf.facet.widgets.celleditors.edit.CelleditorsEditPlugin;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.provider.PapyrustableEditPlugin;
+//import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.provider.Tableinstance02EditPlugin;
+//
+//import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.tableconfiguration.provider.TableConfigurationEditPlugin;
+
+/**
+ * This is the central singleton for the Papyrustableconfiguration edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class PapyrustableconfigurationEditPlugin extends EMFPlugin {
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final PapyrustableconfigurationEditPlugin INSTANCE = new PapyrustableconfigurationEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public PapyrustableconfigurationEditPlugin() {
+ super(new ResourceLocator[]{ CelleditorsEditPlugin.INSTANCE, CustomEditPlugin.INSTANCE, EcoreEditPlugin.INSTANCE, Efacet2EditPlugin.INSTANCE, PapyrustableEditPlugin.INSTANCE,
+
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/provider/PapyrustableconfigurationItemProviderAdapterFactory.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/provider/PapyrustableconfigurationItemProviderAdapterFactory.java
new file mode 100644
index 00000000000..c10b1d52a46
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/provider/PapyrustableconfigurationItemProviderAdapterFactory.java
@@ -0,0 +1,207 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * ttp://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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.util.PapyrustableconfigurationAdapterFactory;
+
+/**
+ * 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 PapyrustableconfigurationItemProviderAdapterFactory extends PapyrustableconfigurationAdapterFactory 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 PapyrustableconfigurationItemProviderAdapterFactory() {
+ 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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusTableConfigurationItemProvider papyrusTableConfigurationItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPapyrusTableConfigurationAdapter() {
+ if (papyrusTableConfigurationItemProvider == null) {
+ papyrusTableConfigurationItemProvider = new PapyrusTableConfigurationItemProvider(this);
+ }
+
+ return papyrusTableConfigurationItemProvider;
+ }
+
+ /**
+ * 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 (papyrusTableConfigurationItemProvider != null) papyrusTableConfigurationItemProvider.dispose();
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/.classpath b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/.classpath
new file mode 100644
index 00000000000..cedf0d0d0b5
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/.project b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/.project
new file mode 100644
index 00000000000..268aacc2025
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/META-INF/MANIFEST.MF b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..949baca876f
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.table.efacet.papyrustablecon
+ figuration.metamodel.papyrustableconfiguration.presentation
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit;bundle-version="0.10.1";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.facet.widgets.celleditors.edit;visibility:=reexport,
+ org.eclipse.emf.facet.custom.metamodel.edit;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.emf.facet.efacet.metamodel.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.table.efacet.metamodel.edit;bundle-version="0.10.1";visibility:=reexport,
+ org.eclipse.emf.facet.widgets.table.metamodel.edit;visibility:=reexport
+Bundle-Vendor: %providerName
+Bundle-Version: 0.10.1.qualifier
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.table.efacet.papyrustablec
+ onfiguration.metamodel.papyrustableconfiguration.presentation.Papyrus
+ tableconfigurationEditorPlugin$Implementation
+Bundle-SymbolicName: org.eclipse.papyrus.infra.table.efacet.papyrustab
+ leconfiguration.metamodel.editor;singleton:=true
+
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/build.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/build.properties
new file mode 100644
index 00000000000..500c7e0cea5
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/build.properties
@@ -0,0 +1,19 @@
+# Copyright (c) 2012 CEA LIST.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# ttp://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src-gen/
+output.. = bin
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/icons/full/obj16/PapyrustableconfigurationModelFile.gif b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/icons/full/obj16/PapyrustableconfigurationModelFile.gif
new file mode 100644
index 00000000000..74c1ecf5723
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/icons/full/obj16/PapyrustableconfigurationModelFile.gif
Binary files differ
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/icons/full/wizban/NewPapyrustableconfiguration.gif b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/icons/full/wizban/NewPapyrustableconfiguration.gif
new file mode 100644
index 00000000000..cda87bb85c1
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/icons/full/wizban/NewPapyrustableconfiguration.gif
Binary files differ
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/plugin.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/plugin.properties
new file mode 100644
index 00000000000..dcc414ad4db
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/plugin.properties
@@ -0,0 +1,62 @@
+# Copyright (c) 2012 CEA LIST.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# ttp://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+
+pluginName = Papyrustableconfiguration Editor
+providerName = www.example.org
+
+_UI_PapyrustableconfigurationEditor_menu = &Papyrustableconfiguration Editor
+
+_UI_CreateChild_menu_item = &New Child
+_UI_CreateSibling_menu_item = N&ew Sibling
+
+_UI_ShowPropertiesView_menu_item = Show &Properties View
+_UI_RefreshViewer_menu_item = &Refresh
+
+_UI_SelectionPage_label = Selection
+_UI_ParentPage_label = Parent
+_UI_ListPage_label = List
+_UI_TreePage_label = Tree
+_UI_TablePage_label = Table
+_UI_TreeWithColumnsPage_label = Tree with Columns
+_UI_ObjectColumn_label = Object
+_UI_SelfColumn_label = Self
+
+_UI_NoObjectSelected = Selected Nothing
+_UI_SingleObjectSelected = Selected Object: {0}
+_UI_MultiObjectSelected = Selected {0} Objects
+
+_UI_OpenEditorError_label = Open Editor
+
+_UI_Wizard_category = Example EMF Model Creation Wizards
+
+_UI_CreateModelError_message = Problems encountered in file "{0}"
+
+_UI_PapyrustableconfigurationModelWizard_label = Papyrustableconfiguration Model
+_UI_PapyrustableconfigurationModelWizard_description = Create a new Papyrustableconfiguration model
+
+_UI_PapyrustableconfigurationEditor_label = Papyrustableconfiguration Model Editor
+
+_UI_PapyrustableconfigurationEditorFilenameDefaultBase = My
+_UI_PapyrustableconfigurationEditorFilenameExtensions = papyrustableconfiguration
+
+_UI_Wizard_label = New
+
+_WARN_FilenameExtension = The file name must end in ''.{0}''
+_WARN_FilenameExtensions = The file name must have one of the following extensions: {0}
+
+_UI_ModelObject = &Model Object
+_UI_XMLEncoding = &XML Encoding
+_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1
+_UI_Wizard_initial_object_description = Select a model object to create
+
+_UI_FileConflict_label = File Conflict
+_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes?
+
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/plugin.xml b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/plugin.xml
new file mode 100644
index 00000000000..e61966bd1d9
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/plugin.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2012 CEA LIST.
+
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ ttp://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.ui.newWizards">
+ <category
+ id="org.eclipse.emf.ecore.Wizard.category.ID"
+ name="%_UI_Wizard_category"/>
+ <wizard
+ id="org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.presentation.PapyrustableconfigurationModelWizardID"
+ name="%_UI_PapyrustableconfigurationModelWizard_label"
+ class="org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.presentation.PapyrustableconfigurationModelWizard"
+ category="org.eclipse.emf.ecore.Wizard.category.ID"
+ icon="icons/full/obj16/PapyrustableconfigurationModelFile.gif">
+ <description>%_UI_PapyrustableconfigurationModelWizard_description</description>
+ <selection class="org.eclipse.core.resources.IResource"/>
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.ui.editors">
+ <editor
+ id="org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.presentation.PapyrustableconfigurationEditorID"
+ name="%_UI_PapyrustableconfigurationEditor_label"
+ icon="icons/full/obj16/PapyrustableconfigurationModelFile.gif"
+ extensions="papyrustableconfiguration"
+ class="org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.presentation.PapyrustableconfigurationEditor"
+ contributorClass="org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.presentation.PapyrustableconfigurationActionBarContributor">
+ </editor>
+ </extension>
+
+</plugin>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationActionBarContributor.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationActionBarContributor.java
new file mode 100644
index 00000000000..e0b66e54fed
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationActionBarContributor.java
@@ -0,0 +1,430 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * ttp://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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.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.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * This is the action bar contributor for the Papyrustableconfiguration model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrustableconfigurationActionBarContributor
+ 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(PapyrustableconfigurationEditorPlugin.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) {
+ PapyrustableconfigurationEditorPlugin.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(PapyrustableconfigurationEditorPlugin.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 PapyrustableconfigurationActionBarContributor() {
+ 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("papyrustableconfiguration-settings")); //$NON-NLS-1$
+ toolBarManager.add(new Separator("papyrustableconfiguration-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(PapyrustableconfigurationEditorPlugin.INSTANCE.getString("_UI_PapyrustableconfigurationEditor_menu"), "org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfigurationMenuID"); //$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(PapyrustableconfigurationEditorPlugin.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(PapyrustableconfigurationEditorPlugin.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(PapyrustableconfigurationEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); //$NON-NLS-1$
+ populateManager(submenuManager, createChildActions, null);
+ menuManager.insertBefore("edit", submenuManager); //$NON-NLS-1$
+
+ submenuManager = new MenuManager(PapyrustableconfigurationEditorPlugin.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/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationEditor.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationEditor.java
new file mode 100644
index 00000000000..6a5bb485e81
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationEditor.java
@@ -0,0 +1,1855 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * ttp://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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.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.EObject;
+import org.eclipse.emf.ecore.EValidator;
+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.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.emf.facet.custom.metamodel.v0_2_0.custom.provider.CustomItemProviderAdapterFactory;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.provider.ExtensibleItemProviderAdapterFactory;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.provider.EFacetItemProviderAdapterFactory;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.query.provider.QueryItemProviderAdapterFactory;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.runtime.provider.RuntimeItemProviderAdapterFactory;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.serialization.provider.SerializationItemProviderAdapterFactory;
+import org.eclipse.emf.facet.widgets.celleditors.modelCellEditor.provider.ModelCellEditorItemProviderAdapterFactory;
+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.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.table.efacet.metamodel.papyrustable.provider.PapyrustableItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.provider.PapyrustableconfigurationItemProviderAdapterFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabFolder;
+import org.eclipse.swt.dnd.DND;
+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;
+//import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.provider.TableItemProviderAdapterFactory;
+//import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.tableconfiguration.provider.TableconfigurationItemProviderAdapterFactory;
+
+
+/**
+ * This is an example of a Papyrustableconfiguration model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class PapyrustableconfigurationEditor 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 PropertySheetPage 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(final IWorkbenchPart p) {
+ if(p instanceof ContentOutline) {
+ if(((ContentOutline)p).getCurrentPage() == PapyrustableconfigurationEditor.this.contentOutlinePage) {
+ getActionBarContributor().setActiveEditor(PapyrustableconfigurationEditor.this);
+
+ setCurrentViewer(PapyrustableconfigurationEditor.this.contentOutlineViewer);
+ }
+ } else if(p instanceof PropertySheet) {
+ if(((PropertySheet)p).getCurrentPage() == PapyrustableconfigurationEditor.this.propertySheetPage) {
+ getActionBarContributor().setActiveEditor(PapyrustableconfigurationEditor.this);
+ handleActivate();
+ }
+ } else if(p == PapyrustableconfigurationEditor.this) {
+ handleActivate();
+ }
+ }
+
+ public void partBroughtToTop(final IWorkbenchPart p) {
+ // Ignore.
+ }
+
+ public void partClosed(final IWorkbenchPart p) {
+ // Ignore.
+ }
+
+ public void partDeactivated(final IWorkbenchPart p) {
+ // Ignore.
+ }
+
+ public void partOpened(final 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(final 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:
+ {
+ final Resource resource = (Resource)notification.getNotifier();
+ final Diagnostic diagnostic = analyzeResourceProblems(resource, null);
+ if(diagnostic.getSeverity() != Diagnostic.OK) {
+ PapyrustableconfigurationEditor.this.resourceToDiagnosticMap.put(resource, diagnostic);
+ } else {
+ PapyrustableconfigurationEditor.this.resourceToDiagnosticMap.remove(resource);
+ }
+
+ if(PapyrustableconfigurationEditor.this.updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ break;
+ }
+ }
+ } else {
+ super.notifyChanged(notification);
+ }
+ }
+
+ @Override
+ protected void setTarget(final Resource target) {
+ basicSetTarget(target);
+ }
+
+ @Override
+ protected void unsetTarget(final Resource target) {
+ basicUnsetTarget(target);
+ }
+ };
+
+ /**
+ * This listens for workspace changes.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IResourceChangeListener resourceChangeListener = new IResourceChangeListener() {
+
+ public void resourceChanged(final IResourceChangeEvent event) {
+ final IResourceDelta delta = event.getDelta();
+ try {
+ class ResourceDeltaVisitor implements IResourceDeltaVisitor {
+
+ protected ResourceSet resourceSet = PapyrustableconfigurationEditor.this.editingDomain.getResourceSet();
+
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ public boolean visit(final IResourceDelta delta) {
+ if(delta.getResource().getType() == IResource.FILE) {
+ if(delta.getKind() == IResourceDelta.REMOVED || delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
+ final 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(!PapyrustableconfigurationEditor.this.savedResources.remove(resource)) {
+ this.changedResources.add(resource);
+ }
+ }
+ }
+ }
+
+ 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() {
+ PapyrustableconfigurationEditor.this.removedResources.addAll(visitor.getRemovedResources());
+ if(!isDirty()) {
+ getSite().getPage().closeEditor(PapyrustableconfigurationEditor.this, false);
+ }
+ }
+ });
+ }
+
+ if(!visitor.getChangedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+
+ public void run() {
+ PapyrustableconfigurationEditor.this.changedResources.addAll(visitor.getChangedResources());
+ if(getSite().getPage().getActiveEditor() == PapyrustableconfigurationEditor.this) {
+ handleActivate();
+ }
+ }
+ });
+ }
+ } catch (final CoreException exception) {
+ PapyrustableconfigurationEditorPlugin.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(PapyrustableconfigurationEditor.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(final Resource resource : this.changedResources) {
+ if(resource.isLoaded()) {
+ resource.unload();
+ try {
+ resource.load(Collections.EMPTY_MAP);
+ } catch (final 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) {
+ final BasicDiagnostic diagnostic = new BasicDiagnostic(Diagnostic.OK, "org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor", //$NON-NLS-1$
+ 0, null, new Object[]{ this.editingDomain.getResourceSet() });
+ for(final 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) {
+ final ProblemEditorPart problemEditorPart = new ProblemEditorPart();
+ problemEditorPart.setDiagnostic(diagnostic);
+ problemEditorPart.setMarkerHelper(this.markerHelper);
+ try {
+ addPage(++lastEditorPage, problemEditorPart, getEditorInput());
+ setPageText(lastEditorPage, problemEditorPart.getPartName());
+ setActivePage(lastEditorPage);
+ showTabs();
+ } catch (final PartInitException exception) {
+ PapyrustableconfigurationEditorPlugin.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 (final CoreException exception) {
+ PapyrustableconfigurationEditorPlugin.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 PapyrustableconfigurationEditor() {
+ super();
+ initializeEditingDomain();
+ }
+
+ /**
+ * This sets up the editing domain for the model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ 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 PapyrustableconfigurationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new ModelCellEditorItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new CustomItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new EFacetItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new SerializationItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new ExtensibleItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new QueryItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new RuntimeItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new PapyrustableItemProviderAdapterFactory());
+ this.adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+
+ // Create the command stack that will notify this editor as commands are executed.
+ //
+ final 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.
+ //
+ final Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
+ if(mostRecentCommand != null) {
+ setSelectionToViewer(mostRecentCommand.getAffectedObjects());
+ }
+ if(PapyrustableconfigurationEditor.this.propertySheetPage != null && !PapyrustableconfigurationEditor.this.propertySheetPage.getControl().isDisposed()) {
+ PapyrustableconfigurationEditor.this.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(final int action) {
+ super.firePropertyChange(action);
+ }
+
+ /**
+ * This sets the selection into whichever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setSelectionToViewer(final Collection<?> collection) {
+ final Collection<?> theSelection = collection;
+ // Make sure it's okay.
+ //
+ if(theSelection != null && !theSelection.isEmpty()) {
+ final Runnable runnable = new Runnable() {
+
+ public void run() {
+ // Try to select the items in the current content viewer of the editor.
+ //
+ if(PapyrustableconfigurationEditor.this.currentViewer != null) {
+ PapyrustableconfigurationEditor.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(final AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object[] getElements(final Object object) {
+ final 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(final Object object) {
+ final 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(final Object object) {
+ final Object parent = super.getParent(object);
+ return parent != null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getParent(final Object object) {
+ return null;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setCurrentViewerPane(final 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(final 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(final 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(final StructuredViewer viewer) {
+ final MenuManager contextMenu = new MenuManager("#PopUp"); //$NON-NLS-1$
+ contextMenu.add(new Separator("additions")); //$NON-NLS-1$
+ contextMenu.setRemoveAllWhenShown(true);
+ contextMenu.addMenuListener(this);
+ final Menu menu = contextMenu.createContextMenu(viewer.getControl());
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));
+
+ final int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
+ final Transfer[] transfers = new Transfer[]{ LocalTransfer.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() {
+ final 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 (final Exception e) {
+ exception = e;
+ resource = this.editingDomain.getResourceSet().getResource(resourceURI, false);
+ }
+
+ final 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(final Resource resource, final Exception exception) {
+ if(!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
+ final BasicDiagnostic basicDiagnostic = new BasicDiagnostic(Diagnostic.ERROR, "org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.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.table.efacet.papyrustableconfiguration.metamodel.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.
+ //
+ {
+ final ViewerPane viewerPane = new ViewerPane(getSite().getPage(), PapyrustableconfigurationEditor.this) {
+
+ @Override
+ public Viewer createViewer(final Composite composite) {
+ final Tree tree = new Tree(composite, SWT.MULTI);
+ final 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);
+ final int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
+ }
+
+ // Create a page for the parent tree view.
+ //
+ {
+ final ViewerPane viewerPane = new ViewerPane(getSite().getPage(), PapyrustableconfigurationEditor.this) {
+
+ @Override
+ public Viewer createViewer(final Composite composite) {
+ final Tree tree = new Tree(composite, SWT.MULTI);
+ final 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);
+ final int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ParentPage_label")); //$NON-NLS-1$
+ }
+
+ // This is the page for the list viewer
+ //
+ {
+ final ViewerPane viewerPane = new ViewerPane(getSite().getPage(), PapyrustableconfigurationEditor.this) {
+
+ @Override
+ public Viewer createViewer(final 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);
+ final int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ListPage_label")); //$NON-NLS-1$
+ }
+
+ // This is the page for the tree viewer
+ //
+ {
+ final ViewerPane viewerPane = new ViewerPane(getSite().getPage(), PapyrustableconfigurationEditor.this) {
+
+ @Override
+ public Viewer createViewer(final 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);
+ final int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreePage_label")); //$NON-NLS-1$
+ }
+
+ // This is the page for the table viewer.
+ //
+ {
+ final ViewerPane viewerPane = new ViewerPane(getSite().getPage(), PapyrustableconfigurationEditor.this) {
+
+ @Override
+ public Viewer createViewer(final Composite composite) {
+ return new TableViewer(composite);
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ this.tableViewer = (TableViewer)viewerPane.getViewer();
+
+ final Table table = this.tableViewer.getTable();
+ final TableLayout layout = new TableLayout();
+ table.setLayout(layout);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ final 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);
+
+ final 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);
+ final int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TablePage_label")); //$NON-NLS-1$
+ }
+
+ // This is the page for the table tree viewer.
+ //
+ {
+ final ViewerPane viewerPane = new ViewerPane(getSite().getPage(), PapyrustableconfigurationEditor.this) {
+
+ @Override
+ public Viewer createViewer(final Composite composite) {
+ return new TreeViewer(composite);
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ this.treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
+
+ final Tree tree = this.treeViewerWithColumns.getTree();
+ tree.setLayoutData(new FillLayout());
+ tree.setHeaderVisible(true);
+ tree.setLinesVisible(true);
+
+ final TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE);
+ objectColumn.setText(getString("_UI_ObjectColumn_label")); //$NON-NLS-1$
+ objectColumn.setResizable(true);
+ objectColumn.setWidth(250);
+
+ final 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);
+ final 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(final 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);
+ final 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);
+ final 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(final 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(final 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(final Composite parent) {
+ super.createControl(parent);
+ PapyrustableconfigurationEditor.this.contentOutlineViewer = getTreeViewer();
+ PapyrustableconfigurationEditor.this.contentOutlineViewer.addSelectionChangedListener(this);
+
+ // Set up the tree viewer.
+ //
+ PapyrustableconfigurationEditor.this.contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(PapyrustableconfigurationEditor.this.adapterFactory));
+ PapyrustableconfigurationEditor.this.contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(PapyrustableconfigurationEditor.this.adapterFactory));
+ PapyrustableconfigurationEditor.this.contentOutlineViewer.setInput(PapyrustableconfigurationEditor.this.editingDomain.getResourceSet());
+
+ // Make sure our popups work.
+ //
+ createContextMenuFor(PapyrustableconfigurationEditor.this.contentOutlineViewer);
+
+ if(!PapyrustableconfigurationEditor.this.editingDomain.getResourceSet().getResources().isEmpty()) {
+ // Select the root object in the view.
+ //
+ PapyrustableconfigurationEditor.this.contentOutlineViewer.setSelection(new StructuredSelection(PapyrustableconfigurationEditor.this.editingDomain.getResourceSet().getResources().get(0)), true);
+ }
+ }
+
+ @Override
+ public void makeContributions(final IMenuManager menuManager, final IToolBarManager toolBarManager, final IStatusLineManager statusLineManager) {
+ super.makeContributions(menuManager, toolBarManager, statusLineManager);
+ PapyrustableconfigurationEditor.this.contentOutlineStatusLineManager = statusLineManager;
+ }
+
+ @Override
+ public void setActionBars(final 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(final 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() {
+ if(this.propertySheetPage == null) {
+ this.propertySheetPage = new ExtendedPropertySheetPage(this.editingDomain) {
+
+ @Override
+ public void setSelectionToViewer(final List<?> selection) {
+ PapyrustableconfigurationEditor.this.setSelectionToViewer(selection);
+ PapyrustableconfigurationEditor.this.setFocus();
+ }
+
+ @Override
+ public void setActionBars(final IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ };
+ this.propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(this.adapterFactory));
+ }
+
+ return this.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(final ISelection selection) {
+ if(this.currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ final Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator();
+ if(selectedElements.hasNext()) {
+ // Get the first selected element.
+ //
+ final 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) {
+ final 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
+ */
+ @Override
+ public void doSave(final 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);
+
+ // Do the work within an operation because this is a long running activity that modifies the workbench.
+ //
+ final WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
+
+ // This is the method that gets invoked when the operation runs.
+ //
+ @Override
+ public void execute(final IProgressMonitor monitor) {
+ // Save the resources to the file system.
+ //
+ boolean first = true;
+ for(final Resource resource : PapyrustableconfigurationEditor.this.editingDomain.getResourceSet().getResources()) {
+ if((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !PapyrustableconfigurationEditor.this.editingDomain.isReadOnly(resource)) {
+ try {
+ final long timeStamp = resource.getTimeStamp();
+ resource.save(saveOptions);
+ if(resource.getTimeStamp() != timeStamp) {
+ PapyrustableconfigurationEditor.this.savedResources.add(resource);
+ }
+ } catch (final Exception exception) {
+ PapyrustableconfigurationEditor.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 (final Exception exception) {
+ // Something went wrong that shouldn't.
+ //
+ PapyrustableconfigurationEditorPlugin.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(final Resource resource) {
+ boolean result = false;
+ try {
+ final InputStream stream = this.editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ if(stream != null) {
+ result = true;
+ stream.close();
+ }
+ } catch (final 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() {
+ final SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
+ saveAsDialog.open();
+ final IPath path = saveAsDialog.getResult();
+ if(path != null) {
+ final 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(final URI uri, final IEditorInput editorInput) {
+ (this.editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ final IProgressMonitor progressMonitor = getActionBars().getStatusLineManager() != null ? getActionBars().getStatusLineManager().getProgressMonitor() : new NullProgressMonitor();
+ doSave(progressMonitor);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void gotoMarker(final IMarker marker) {
+ try {
+ if(marker.getType().equals(EValidator.MARKER)) {
+ final String uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);
+ if(uriAttribute != null) {
+ final URI uri = URI.createURI(uriAttribute);
+ final EObject eObject = this.editingDomain.getResourceSet().getEObject(uri, true);
+ if(eObject != null) {
+ setSelectionToViewer(Collections.singleton(this.editingDomain.getWrapper(eObject)));
+ }
+ }
+ }
+ } catch (final CoreException exception) {
+ PapyrustableconfigurationEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+
+ /**
+ * This is called during startup.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void init(final IEditorSite site, final 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(final ISelectionChangedListener listener) {
+ this.selectionChangedListeners.add(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void removeSelectionChangedListener(final 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(final ISelection selection) {
+ this.editorSelection = selection;
+
+ for(final ISelectionChangedListener listener : this.selectionChangedListeners) {
+ listener.selectionChanged(new SelectionChangedEvent(this, selection));
+ }
+ setStatusLineManager(selection);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setStatusLineManager(final ISelection selection) {
+ final IStatusLineManager statusLineManager = this.currentViewer != null && this.currentViewer == this.contentOutlineViewer ? this.contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+
+ if(statusLineManager != null) {
+ if(selection instanceof IStructuredSelection) {
+ final Collection<?> collection = ((IStructuredSelection)selection).toList();
+ switch(collection.size()) {
+ case 0:
+ {
+ statusLineManager.setMessage(getString("_UI_NoObjectSelected")); //$NON-NLS-1$
+ break;
+ }
+ case 1:
+ {
+ final 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(final String key) {
+ return PapyrustableconfigurationEditorPlugin.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(final String key, final Object s1) {
+ return PapyrustableconfigurationEditorPlugin.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(final 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);
+ }
+
+ if(this.propertySheetPage != null) {
+ this.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/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationEditorPlugin.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationEditorPlugin.java
new file mode 100644
index 00000000000..e7a8fee45b0
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationEditorPlugin.java
@@ -0,0 +1,114 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * ttp://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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.presentation;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.ui.EclipseUIPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+import org.eclipse.emf.facet.custom.metamodel.v0_2_0.custom.provider.CustomEditPlugin;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.provider.Efacet2EditPlugin;
+import org.eclipse.emf.facet.widgets.celleditors.edit.CelleditorsEditPlugin;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.provider.PapyrustableEditPlugin;
+//import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.table.provider.Tableinstance02EditPlugin;
+//import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.tableconfiguration.provider.TableConfigurationEditPlugin;
+
+/**
+ * This is the central singleton for the Papyrustableconfiguration editor plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public final class PapyrustableconfigurationEditorPlugin extends EMFPlugin {
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final PapyrustableconfigurationEditorPlugin INSTANCE = new PapyrustableconfigurationEditorPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public PapyrustableconfigurationEditorPlugin() {
+ super(new ResourceLocator[]{ CelleditorsEditPlugin.INSTANCE, CustomEditPlugin.INSTANCE, EcoreEditPlugin.INSTANCE, Efacet2EditPlugin.INSTANCE, PapyrustableEditPlugin.INSTANCE, });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static class Implementation extends EclipseUIPlugin {
+
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationModelWizard.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationModelWizard.java
new file mode 100644
index 00000000000..e0f29367ca1
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/presentation/PapyrustableconfigurationModelWizard.java
@@ -0,0 +1,613 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * ttp://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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.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.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.core.runtime.Path;
+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.EObject;
+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.xmi.XMLResource;
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationFactory;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationPackage;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.provider.PapyrustableconfigurationEditPlugin;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+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.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.ISetSelectionTarget;
+
+
+/**
+ * This is a simple wizard for creating a new model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrustableconfigurationModelWizard 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(PapyrustableconfigurationEditorPlugin.INSTANCE.getString("_UI_PapyrustableconfigurationEditorFilenameExtensions").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 =
+ PapyrustableconfigurationEditorPlugin.INSTANCE.getString("_UI_PapyrustableconfigurationEditorFilenameExtensions").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 PapyrustableconfigurationPackage papyrustableconfigurationPackage = PapyrustableconfigurationPackage.eINSTANCE;
+
+ /**
+ * This caches an instance of the model factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrustableconfigurationFactory papyrustableconfigurationFactory = papyrustableconfigurationPackage.getPapyrustableconfigurationFactory();
+
+ /**
+ * This is the file creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrustableconfigurationModelWizardNewFileCreationPage newFileCreationPage;
+
+ /**
+ * This is the initial object creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrustableconfigurationModelWizardInitialObjectCreationPage 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(PapyrustableconfigurationEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); //$NON-NLS-1$
+ setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(PapyrustableconfigurationEditorPlugin.INSTANCE.getImage("full/wizban/NewPapyrustableconfiguration"))); //$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 : papyrustableconfigurationPackage.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)papyrustableconfigurationPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
+ EObject rootObject = papyrustableconfigurationFactory.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) {
+ PapyrustableconfigurationEditorPlugin.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(), PapyrustableconfigurationEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); //$NON-NLS-1$
+ return false;
+ }
+
+ return true;
+ }
+ catch (Exception exception) {
+ PapyrustableconfigurationEditorPlugin.INSTANCE.log(exception);
+ return false;
+ }
+ }
+
+ /**
+ * This is the one page of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class PapyrustableconfigurationModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustableconfigurationModelWizardNewFileCreationPage(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(PapyrustableconfigurationEditorPlugin.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 PapyrustableconfigurationModelWizardInitialObjectCreationPage 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 PapyrustableconfigurationModelWizardInitialObjectCreationPage(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(PapyrustableconfigurationEditorPlugin.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(PapyrustableconfigurationEditorPlugin.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 PapyrustableconfigurationEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ catch(MissingResourceException mre) {
+ PapyrustableconfigurationEditorPlugin.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(PapyrustableconfigurationEditorPlugin.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 PapyrustableconfigurationModelWizardNewFileCreationPage("Whatever", selection); //$NON-NLS-1$
+ newFileCreationPage.setTitle(PapyrustableconfigurationEditorPlugin.INSTANCE.getString("_UI_PapyrustableconfigurationModelWizard_label")); //$NON-NLS-1$
+ newFileCreationPage.setDescription(PapyrustableconfigurationEditorPlugin.INSTANCE.getString("_UI_PapyrustableconfigurationModelWizard_description")); //$NON-NLS-1$
+ newFileCreationPage.setFileName(PapyrustableconfigurationEditorPlugin.INSTANCE.getString("_UI_PapyrustableconfigurationEditorFilenameDefaultBase") + "." + 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 = PapyrustableconfigurationEditorPlugin.INSTANCE.getString("_UI_PapyrustableconfigurationEditorFilenameDefaultBase"); //$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 PapyrustableconfigurationModelWizardInitialObjectCreationPage("Whatever2"); //$NON-NLS-1$
+ initialObjectCreationPage.setTitle(PapyrustableconfigurationEditorPlugin.INSTANCE.getString("_UI_PapyrustableconfigurationModelWizard_label")); //$NON-NLS-1$
+ initialObjectCreationPage.setDescription(PapyrustableconfigurationEditorPlugin.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/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/.classpath b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/.classpath
new file mode 100644
index 00000000000..cedf0d0d0b5
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/.project b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/.project
new file mode 100644
index 00000000000..0564fe1e1ec
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/META-INF/MANIFEST.MF b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..8e2dab5dba9
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration,
+ org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl,
+ org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.facet.widgets.celleditors;visibility:=reexport,
+ org.eclipse.emf.facet.custom.metamodel;visibility:=reexport,
+ org.eclipse.emf.facet.efacet.metamodel;visibility:=reexport,
+ org.eclipse.papyrus.infra.table.efacet.metamodel;bundle-version="0.10.1";visibility:=reexport,
+ org.eclipse.emf.facet.widgets.table.metamodel;visibility:=reexport
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 0.10.1.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.table.efacet.papyrustab
+ leconfiguration.metamodel;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/about.html b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/build.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/build.properties
new file mode 100644
index 00000000000..3de35d375d1
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/build.properties
@@ -0,0 +1,19 @@
+# Copyright (c) 2012 CEA LIST.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# ttp://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src-gen/
+output.. = bin/
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/documentation.pdoc b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/documentation.pdoc
new file mode 100644
index 00000000000..40c207632b9
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/documentation.pdoc
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin provides the metamodel used in Papyrus for the Papyrus table configuration.">
+ <referent firstName="vincent" lastName="lorenzo" eMail="vincent.lorenzo@cea.fr" currentCompany="CEA-LIST"/>
+</doc:Documentation>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/model/papyrustableconfiguration.ecore b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/model/papyrustableconfiguration.ecore
new file mode 100644
index 00000000000..1dd62e886e4
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/model/papyrustableconfiguration.ecore
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage 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" name="papyrustableconfiguration" nsURI="http://www.eclipse.org/Papyrus/PapyrusTableConfiguration/0.9.0/papyrustableconfiguration"
+ nsPrefix="org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This package contains the model used in Papyrus to configure a PapyrusTableInstance2"/>
+ </eAnnotations>
+ <eClassifiers xsi:type="ecore:EClass" name="PapyrusTableConfiguration" eSuperTypes="http://www.eclipse.org/emf/2002/Ecore#//EModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This element registers the parameters to configure a PapyrusTableInstance2"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="fillingMode" ordered="false"
+ eType="ecore:EEnum platform:/plugin/org.eclipse.papyrus.infra.table.efacet.metamodel/model/papyrustable.ecore#//FillingMode">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This field allows to define the filling mode to use when the table is created."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="fillingQueries" upperBound="-1"
+ eType="ecore:EClass platform:/plugin/org.eclipse.emf.facet.efacet.metamodel/model/efacet-0.2.0.ecore#//extensible/Query">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This list registers the queries used to fill the PapyrusTable when it is in Queries Mode"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="listenContextFeature" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EReference">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This field references the feature of the context of the table to listen, when the table in is Feature Mode"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="tableConfiguration" eType="ecore:EClass platform:/plugin/org.eclipse.emf.facet.widgets.table.metamodel/model/tableConfiguration-0.2.0.ecore#//TableConfiguration"
+ containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This field references the emf-facet table configuration."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/model/papyrustableconfiguration.genmodel b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/model/papyrustableconfiguration.genmodel
new file mode 100644
index 00000000000..3579c06aae0
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/model/papyrustableconfiguration.genmodel
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2012 CEA LIST.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;ttp://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation"
+ modelDirectory="/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen"
+ editDirectory="/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit/src-gen"
+ editorDirectory="/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor/src-gen"
+ modelPluginID="org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel"
+ modelName="Papyrustableconfiguration" nonNLSMarkers="true" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" copyrightFields="false" editPluginID="org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.edit"
+ editorPluginID="org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.editor"
+ language="" usedGenPackages="platform:/plugin/org.eclipse.emf.facet.widgets.celleditors/model/celleditors.genmodel#//modelCellEditor platform:/plugin/org.eclipse.emf.facet.custom.metamodel/model/custom-0.2.0.genmodel#//custom platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore platform:/plugin/org.eclipse.emf.facet.efacet.metamodel/model/efacet-0.2.0.genmodel#//efacet platform:/plugin/org.eclipse.papyrus.infra.table.efacet.metamodel/model/papyrustable.genmodel#//papyrustable platform:/plugin/org.eclipse.emf.facet.widgets.table.metamodel/model/tableConfiguration-0.2.0.genmodel#//tableconfiguration platform:/plugin/org.eclipse.emf.facet.widgets.table.metamodel/model/table-0.2.0.genmodel#//table">
+ <foreignModel>papyrustableconfiguration.ecore</foreignModel>
+ <genPackages prefix="Papyrustableconfiguration" basePackage="org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel"
+ disposableProviderFactory="true" ecorePackage="papyrustableconfiguration.ecore#/">
+ <genClasses ecoreClass="papyrustableconfiguration.ecore#//PapyrusTableConfiguration">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute papyrustableconfiguration.ecore#//PapyrusTableConfiguration/fillingMode"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference papyrustableconfiguration.ecore#//PapyrusTableConfiguration/fillingQueries"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference papyrustableconfiguration.ecore#//PapyrusTableConfiguration/listenFeature"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference papyrustableconfiguration.ecore#//PapyrusTableConfiguration/tableConfiguration"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/plugin.properties b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/plugin.properties
new file mode 100644
index 00000000000..ba08677260b
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/plugin.properties
@@ -0,0 +1,13 @@
+# Copyright (c) 2012 CEA LIST.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# ttp://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+
+pluginName = Papyrustableconfiguration Model
+providerName = www.example.org
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/plugin.xml b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/plugin.xml
new file mode 100644
index 00000000000..50438105394
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/plugin.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2012 CEA LIST.
+
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ ttp://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://www.eclipse.org/Papyrus/PapyrusTableConfiguration/0.9.0/papyrustableconfiguration"
+ class="org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl.PapyrustableconfigurationPackageImpl"
+ genModel="model/papyrustableconfiguration.genmodel"/>
+ </extension>
+
+</plugin>
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/PapyrusTableConfiguration.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/PapyrusTableConfiguration.java
new file mode 100644
index 00000000000..7cf90fa8666
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/PapyrusTableConfiguration.java
@@ -0,0 +1,143 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * ttp://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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.Query;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.tableconfiguration.TableConfiguration;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode;
+
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Papyrus Table Configuration</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This element registers the parameters to configure a PapyrusTableInstance2
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getFillingMode <em>Filling Mode</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getFillingQueries <em>Filling Queries</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getListenContextFeature <em>Listen Context Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getTableConfiguration <em>Table Configuration</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationPackage#getPapyrusTableConfiguration()
+ * @model
+ * @generated
+ */
+public interface PapyrusTableConfiguration extends EObject, EModelElement {
+
+ /**
+ * Returns the value of the '<em><b>Filling Mode</b></em>' attribute.
+ * The literals are from the enumeration {@link org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This field allows to define the filling mode to use when the table is created.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Filling Mode</em>' attribute.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode
+ * @see #setFillingMode(FillingMode)
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationPackage#getPapyrusTableConfiguration_FillingMode()
+ * @model ordered="false"
+ * @generated
+ */
+ FillingMode getFillingMode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getFillingMode <em>Filling Mode</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Filling Mode</em>' attribute.
+ * @see org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode
+ * @see #getFillingMode()
+ * @generated
+ */
+ void setFillingMode(FillingMode value);
+
+ /**
+ * Returns the value of the '<em><b>Filling Queries</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.Query}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This list registers the queries used to fill the PapyrusTable when it is in Queries Mode
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Filling Queries</em>' reference list.
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationPackage#getPapyrusTableConfiguration_FillingQueries()
+ * @model
+ * @generated
+ */
+ EList<Query> getFillingQueries();
+
+ /**
+ * Returns the value of the '<em><b>Listen Context Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This field references the feature of the context of the table to listen, when the table in is Feature Mode
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Listen Context Feature</em>' reference.
+ * @see #setListenContextFeature(EReference)
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationPackage#getPapyrusTableConfiguration_ListenContextFeature()
+ * @model
+ * @generated
+ */
+ EReference getListenContextFeature();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getListenContextFeature <em>Listen Context Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Listen Context Feature</em>' reference.
+ * @see #getListenContextFeature()
+ * @generated
+ */
+ void setListenContextFeature(EReference value);
+
+ /**
+ * Returns the value of the '<em><b>Table Configuration</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This field references the emf-facet table configuration.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Table Configuration</em>' containment reference.
+ * @see #setTableConfiguration(TableConfiguration)
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationPackage#getPapyrusTableConfiguration_TableConfiguration()
+ * @model containment="true"
+ * @generated
+ */
+ TableConfiguration getTableConfiguration();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getTableConfiguration <em>Table Configuration</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Table Configuration</em>' containment reference.
+ * @see #getTableConfiguration()
+ * @generated
+ */
+ void setTableConfiguration(TableConfiguration value);
+
+} // PapyrusTableConfiguration
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/PapyrustableconfigurationFactory.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/PapyrustableconfigurationFactory.java
new file mode 100644
index 00000000000..c10335eed47
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/PapyrustableconfigurationFactory.java
@@ -0,0 +1,52 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * ttp://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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationPackage
+ * @generated
+ */
+public interface PapyrustableconfigurationFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ PapyrustableconfigurationFactory eINSTANCE = org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl.PapyrustableconfigurationFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Papyrus Table Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Papyrus Table Configuration</em>'.
+ * @generated
+ */
+ PapyrusTableConfiguration createPapyrusTableConfiguration();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ PapyrustableconfigurationPackage getPapyrustableconfigurationPackage();
+
+} //PapyrustableconfigurationFactory
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/PapyrustableconfigurationPackage.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/PapyrustableconfigurationPackage.java
new file mode 100644
index 00000000000..6c2378eaa13
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/PapyrustableconfigurationPackage.java
@@ -0,0 +1,257 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * ttp://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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This package contains the model used in Papyrus to configure a PapyrusTableInstance2
+ * <!-- end-model-doc -->
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface PapyrustableconfigurationPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "papyrustableconfiguration"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/Papyrus/PapyrusTableConfiguration/0.9.0/papyrustableconfiguration"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ PapyrustableconfigurationPackage eINSTANCE = org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl.PapyrustableconfigurationPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl.PapyrusTableConfigurationImpl <em>Papyrus Table Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl.PapyrusTableConfigurationImpl
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl.PapyrustableconfigurationPackageImpl#getPapyrusTableConfiguration()
+ * @generated
+ */
+ int PAPYRUS_TABLE_CONFIGURATION = 0;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE_CONFIGURATION__EANNOTATIONS = EcorePackage.EMODEL_ELEMENT__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Filling Mode</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE_CONFIGURATION__FILLING_MODE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Filling Queries</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE_CONFIGURATION__FILLING_QUERIES = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Listen Context Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE_CONFIGURATION__LISTEN_CONTEXT_FEATURE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Table Configuration</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE_CONFIGURATION__TABLE_CONFIGURATION = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>Papyrus Table Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE_CONFIGURATION_FEATURE_COUNT = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 4;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration <em>Papyrus Table Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Papyrus Table Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration
+ * @generated
+ */
+ EClass getPapyrusTableConfiguration();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getFillingMode <em>Filling Mode</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Filling Mode</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getFillingMode()
+ * @see #getPapyrusTableConfiguration()
+ * @generated
+ */
+ EAttribute getPapyrusTableConfiguration_FillingMode();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getFillingQueries <em>Filling Queries</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Filling Queries</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getFillingQueries()
+ * @see #getPapyrusTableConfiguration()
+ * @generated
+ */
+ EReference getPapyrusTableConfiguration_FillingQueries();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getListenContextFeature <em>Listen Context Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Listen Context Feature</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getListenContextFeature()
+ * @see #getPapyrusTableConfiguration()
+ * @generated
+ */
+ EReference getPapyrusTableConfiguration_ListenContextFeature();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getTableConfiguration <em>Table Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Table Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration#getTableConfiguration()
+ * @see #getPapyrusTableConfiguration()
+ * @generated
+ */
+ EReference getPapyrusTableConfiguration_TableConfiguration();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ PapyrustableconfigurationFactory getPapyrustableconfigurationFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl.PapyrusTableConfigurationImpl <em>Papyrus Table Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl.PapyrusTableConfigurationImpl
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl.PapyrustableconfigurationPackageImpl#getPapyrusTableConfiguration()
+ * @generated
+ */
+ EClass PAPYRUS_TABLE_CONFIGURATION = eINSTANCE.getPapyrusTableConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Filling Mode</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TABLE_CONFIGURATION__FILLING_MODE = eINSTANCE.getPapyrusTableConfiguration_FillingMode();
+
+ /**
+ * The meta object literal for the '<em><b>Filling Queries</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_TABLE_CONFIGURATION__FILLING_QUERIES = eINSTANCE.getPapyrusTableConfiguration_FillingQueries();
+
+ /**
+ * The meta object literal for the '<em><b>Listen Context Feature</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_TABLE_CONFIGURATION__LISTEN_CONTEXT_FEATURE = eINSTANCE.getPapyrusTableConfiguration_ListenContextFeature();
+
+ /**
+ * The meta object literal for the '<em><b>Table Configuration</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_TABLE_CONFIGURATION__TABLE_CONFIGURATION = eINSTANCE.getPapyrusTableConfiguration_TableConfiguration();
+
+ }
+
+} //PapyrustableconfigurationPackage
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/impl/PapyrusTableConfigurationImpl.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/impl/PapyrusTableConfigurationImpl.java
new file mode 100644
index 00000000000..8d581bb46fb
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/impl/PapyrusTableConfigurationImpl.java
@@ -0,0 +1,353 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * ttp://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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.EModelElementImpl;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.Query;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.tableconfiguration.TableConfiguration;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.FillingMode;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Papyrus Table Configuration</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl.PapyrusTableConfigurationImpl#getFillingMode <em>Filling Mode</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl.PapyrusTableConfigurationImpl#getFillingQueries <em>Filling Queries</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl.PapyrusTableConfigurationImpl#getListenContextFeature <em>Listen Context Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl.PapyrusTableConfigurationImpl#getTableConfiguration <em>Table Configuration</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PapyrusTableConfigurationImpl extends EModelElementImpl implements PapyrusTableConfiguration {
+ /**
+ * The default value of the '{@link #getFillingMode() <em>Filling Mode</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFillingMode()
+ * @generated
+ * @ordered
+ */
+ protected static final FillingMode FILLING_MODE_EDEFAULT = FillingMode.USER;
+
+ /**
+ * The cached value of the '{@link #getFillingMode() <em>Filling Mode</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFillingMode()
+ * @generated
+ * @ordered
+ */
+ protected FillingMode fillingMode = FILLING_MODE_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getFillingQueries() <em>Filling Queries</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFillingQueries()
+ * @generated
+ * @ordered
+ */
+ protected EList<Query> fillingQueries;
+
+ /**
+ * The cached value of the '{@link #getListenContextFeature() <em>Listen Context Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getListenContextFeature()
+ * @generated
+ * @ordered
+ */
+ protected EReference listenContextFeature;
+
+ /**
+ * The cached value of the '{@link #getTableConfiguration() <em>Table Configuration</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTableConfiguration()
+ * @generated
+ * @ordered
+ */
+ protected TableConfiguration tableConfiguration;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusTableConfigurationImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PapyrustableconfigurationPackage.Literals.PAPYRUS_TABLE_CONFIGURATION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FillingMode getFillingMode() {
+ return fillingMode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFillingMode(FillingMode newFillingMode) {
+ FillingMode oldFillingMode = fillingMode;
+ fillingMode = newFillingMode == null ? FILLING_MODE_EDEFAULT : newFillingMode;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__FILLING_MODE, oldFillingMode, fillingMode));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Query> getFillingQueries() {
+ if (fillingQueries == null) {
+ fillingQueries = new EObjectResolvingEList<Query>(Query.class, this, PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__FILLING_QUERIES);
+ }
+ return fillingQueries;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getListenContextFeature() {
+ if (listenContextFeature != null && listenContextFeature.eIsProxy()) {
+ InternalEObject oldListenContextFeature = (InternalEObject)listenContextFeature;
+ listenContextFeature = (EReference)eResolveProxy(oldListenContextFeature);
+ if (listenContextFeature != oldListenContextFeature) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__LISTEN_CONTEXT_FEATURE, oldListenContextFeature, listenContextFeature));
+ }
+ }
+ return listenContextFeature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference basicGetListenContextFeature() {
+ return listenContextFeature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setListenContextFeature(EReference newListenContextFeature) {
+ EReference oldListenContextFeature = listenContextFeature;
+ listenContextFeature = newListenContextFeature;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__LISTEN_CONTEXT_FEATURE, oldListenContextFeature, listenContextFeature));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TableConfiguration getTableConfiguration() {
+ return tableConfiguration;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetTableConfiguration(TableConfiguration newTableConfiguration, NotificationChain msgs) {
+ TableConfiguration oldTableConfiguration = tableConfiguration;
+ tableConfiguration = newTableConfiguration;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__TABLE_CONFIGURATION, oldTableConfiguration, newTableConfiguration);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTableConfiguration(TableConfiguration newTableConfiguration) {
+ if (newTableConfiguration != tableConfiguration) {
+ NotificationChain msgs = null;
+ if (tableConfiguration != null)
+ msgs = ((InternalEObject)tableConfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__TABLE_CONFIGURATION, null, msgs);
+ if (newTableConfiguration != null)
+ msgs = ((InternalEObject)newTableConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__TABLE_CONFIGURATION, null, msgs);
+ msgs = basicSetTableConfiguration(newTableConfiguration, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__TABLE_CONFIGURATION, newTableConfiguration, newTableConfiguration));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__TABLE_CONFIGURATION:
+ return basicSetTableConfiguration(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__FILLING_MODE:
+ return getFillingMode();
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__FILLING_QUERIES:
+ return getFillingQueries();
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__LISTEN_CONTEXT_FEATURE:
+ if (resolve) return getListenContextFeature();
+ return basicGetListenContextFeature();
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__TABLE_CONFIGURATION:
+ return getTableConfiguration();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__FILLING_MODE:
+ setFillingMode((FillingMode)newValue);
+ return;
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__FILLING_QUERIES:
+ getFillingQueries().clear();
+ getFillingQueries().addAll((Collection<? extends Query>)newValue);
+ return;
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__LISTEN_CONTEXT_FEATURE:
+ setListenContextFeature((EReference)newValue);
+ return;
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__TABLE_CONFIGURATION:
+ setTableConfiguration((TableConfiguration)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__FILLING_MODE:
+ setFillingMode(FILLING_MODE_EDEFAULT);
+ return;
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__FILLING_QUERIES:
+ getFillingQueries().clear();
+ return;
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__LISTEN_CONTEXT_FEATURE:
+ setListenContextFeature((EReference)null);
+ return;
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__TABLE_CONFIGURATION:
+ setTableConfiguration((TableConfiguration)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__FILLING_MODE:
+ return fillingMode != FILLING_MODE_EDEFAULT;
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__FILLING_QUERIES:
+ return fillingQueries != null && !fillingQueries.isEmpty();
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__LISTEN_CONTEXT_FEATURE:
+ return listenContextFeature != null;
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION__TABLE_CONFIGURATION:
+ return tableConfiguration != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (fillingMode: "); //$NON-NLS-1$
+ result.append(fillingMode);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PapyrusTableConfigurationImpl
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/impl/PapyrustableconfigurationFactoryImpl.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/impl/PapyrustableconfigurationFactoryImpl.java
new file mode 100644
index 00000000000..647999d7582
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/impl/PapyrustableconfigurationFactoryImpl.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * ttp://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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationFactory;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrustableconfigurationFactoryImpl extends EFactoryImpl implements PapyrustableconfigurationFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static PapyrustableconfigurationFactory init() {
+ try {
+ PapyrustableconfigurationFactory thePapyrustableconfigurationFactory = (PapyrustableconfigurationFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/Papyrus/PapyrusTableConfiguration/0.9.0/papyrustableconfiguration"); //$NON-NLS-1$
+ if (thePapyrustableconfigurationFactory != null) {
+ return thePapyrustableconfigurationFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new PapyrustableconfigurationFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustableconfigurationFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case PapyrustableconfigurationPackage.PAPYRUS_TABLE_CONFIGURATION: return createPapyrusTableConfiguration();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusTableConfiguration createPapyrusTableConfiguration() {
+ PapyrusTableConfigurationImpl papyrusTableConfiguration = new PapyrusTableConfigurationImpl();
+ return papyrusTableConfiguration;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustableconfigurationPackage getPapyrustableconfigurationPackage() {
+ return (PapyrustableconfigurationPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static PapyrustableconfigurationPackage getPackage() {
+ return PapyrustableconfigurationPackage.eINSTANCE;
+ }
+
+} //PapyrustableconfigurationFactoryImpl
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/impl/PapyrustableconfigurationPackageImpl.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/impl/PapyrustableconfigurationPackageImpl.java
new file mode 100644
index 00000000000..bb7d279533c
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/impl/PapyrustableconfigurationPackageImpl.java
@@ -0,0 +1,231 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * ttp://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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.ExtensiblePackage;
+import org.eclipse.emf.facet.widgets.table.metamodel.v0_2_0.tableconfiguration.TableconfigurationPackage;
+import org.eclipse.papyrus.infra.table.efacet.metamodel.papyrustable.PapyrustablePackage;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationFactory;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrustableconfigurationPackageImpl extends EPackageImpl implements PapyrustableconfigurationPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass papyrusTableConfigurationEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private PapyrustableconfigurationPackageImpl() {
+ super(eNS_URI, PapyrustableconfigurationFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link PapyrustableconfigurationPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static PapyrustableconfigurationPackage init() {
+ if (isInited) return (PapyrustableconfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(PapyrustableconfigurationPackage.eNS_URI);
+
+ // Obtain or create and register package
+ PapyrustableconfigurationPackageImpl thePapyrustableconfigurationPackage = (PapyrustableconfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PapyrustableconfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PapyrustableconfigurationPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ PapyrustablePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ thePapyrustableconfigurationPackage.createPackageContents();
+
+ // Initialize created meta-data
+ thePapyrustableconfigurationPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ thePapyrustableconfigurationPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(PapyrustableconfigurationPackage.eNS_URI, thePapyrustableconfigurationPackage);
+ return thePapyrustableconfigurationPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPapyrusTableConfiguration() {
+ return papyrusTableConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTableConfiguration_FillingMode() {
+ return (EAttribute)papyrusTableConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusTableConfiguration_FillingQueries() {
+ return (EReference)papyrusTableConfigurationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusTableConfiguration_ListenContextFeature() {
+ return (EReference)papyrusTableConfigurationEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusTableConfiguration_TableConfiguration() {
+ return (EReference)papyrusTableConfigurationEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrustableconfigurationFactory getPapyrustableconfigurationFactory() {
+ return (PapyrustableconfigurationFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ papyrusTableConfigurationEClass = createEClass(PAPYRUS_TABLE_CONFIGURATION);
+ createEAttribute(papyrusTableConfigurationEClass, PAPYRUS_TABLE_CONFIGURATION__FILLING_MODE);
+ createEReference(papyrusTableConfigurationEClass, PAPYRUS_TABLE_CONFIGURATION__FILLING_QUERIES);
+ createEReference(papyrusTableConfigurationEClass, PAPYRUS_TABLE_CONFIGURATION__LISTEN_CONTEXT_FEATURE);
+ createEReference(papyrusTableConfigurationEClass, PAPYRUS_TABLE_CONFIGURATION__TABLE_CONFIGURATION);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ PapyrustablePackage thePapyrustablePackage = (PapyrustablePackage)EPackage.Registry.INSTANCE.getEPackage(PapyrustablePackage.eNS_URI);
+ ExtensiblePackage theExtensiblePackage = (ExtensiblePackage)EPackage.Registry.INSTANCE.getEPackage(ExtensiblePackage.eNS_URI);
+ TableconfigurationPackage theTableconfigurationPackage = (TableconfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(TableconfigurationPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ papyrusTableConfigurationEClass.getESuperTypes().add(ecorePackage.getEModelElement());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(papyrusTableConfigurationEClass, PapyrusTableConfiguration.class, "PapyrusTableConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getPapyrusTableConfiguration_FillingMode(), thePapyrustablePackage.getFillingMode(), "fillingMode", null, 0, 1, PapyrusTableConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPapyrusTableConfiguration_FillingQueries(), theExtensiblePackage.getQuery(), null, "fillingQueries", null, 0, -1, PapyrusTableConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPapyrusTableConfiguration_ListenContextFeature(), ecorePackage.getEReference(), null, "listenContextFeature", null, 0, 1, PapyrusTableConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPapyrusTableConfiguration_TableConfiguration(), theTableconfigurationPackage.getTableConfiguration(), null, "tableConfiguration", null, 0, 1, PapyrusTableConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //PapyrustableconfigurationPackageImpl
diff --git a/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/util/PapyrustableconfigurationAdapterFactory.java b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/util/PapyrustableconfigurationAdapterFactory.java
new file mode 100644
index 00000000000..19a866f37eb
--- /dev/null
+++ b/deprecated/TableEFacet/org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel/src-gen/org/eclipse/papyrus/infra/table/efacet/papyrustableconfiguration/metamodel/papyrustableconfiguration/util/PapyrustableconfigurationAdapterFactory.java
@@ -0,0 +1,147 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * ttp://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.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrusTableConfiguration;
+import org.eclipse.papyrus.infra.table.efacet.papyrustableconfiguration.metamodel.papyrustableconfiguration.PapyrustableconfigurationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>create