Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2013-08-26 15:13:35 +0000
committerAnsgar Radermacher2013-08-26 15:13:35 +0000
commitc692ce68e1f2c2ea1c8d7d0f1ead81e5a8f4ad3e (patch)
treeedec89154dbc01d34d408baf03a8336621890e69 /extraplugins
parent323752dd28b857ee9c227f0427e015a4829fff46 (diff)
downloadorg.eclipse.papyrus-c692ce68e1f2c2ea1c8d7d0f1ead81e5a8f4ad3e.tar.gz
org.eclipse.papyrus-c692ce68e1f2c2ea1c8d7d0f1ead81e5a8f4ad3e.tar.xz
org.eclipse.papyrus-c692ce68e1f2c2ea1c8d7d0f1ead81e5a8f4ad3e.zip
- Refactoring:
org.eclipse.papyrus.text.instance => org.eclipse.papyrus.texteditor.model org.eclipse.papyrus.exteditor.cdt => org.eclipse.papyrus.texteditor.cdt - Use proper URL to register texteditor model
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/icons/texteditor.bmpbin1078 -> 0 bytes
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/.classpath (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/.classpath)0
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/.project (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/.project)2
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/.settings/org.eclipse.jdt.core.prefs (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/META-INF/MANIFEST.MF (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/META-INF/MANIFEST.MF)9
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/about.html (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/about.html)0
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/build.properties (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/build.properties)0
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/icons/texteditor.gifbin0 -> 151 bytes
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/icons/texteditor.xcfbin0 -> 1055 bytes
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/plugin.pdoc (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/plugin.pdoc)0
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/plugin.properties (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/plugin.properties)0
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/plugin.xml (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/plugin.xml)12
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/Activator.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/Activator.java)2
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/AddProfileAndModelLibsHandler.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/AddProfileAndModelLibsHandler.java)2
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/CommandSupport.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/CommandSupport.java)2
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/Utils.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/Utils.java)2
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/editor/DelegatingSourceViewer.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/editor/DelegatingSourceViewer.java)2
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/editor/PapyrusCDTEditor.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/editor/PapyrusCDTEditor.java)16
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/factory/PapyrusCDTEditorFactory.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/factory/PapyrusCDTEditorFactory.java)36
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/handler/PapyrusCDTEditorHandler.java)18
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/listener/ModelListener.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/listener/ModelListener.java)2
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/listener/OperationHistoryListener.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/listener/OperationHistoryListener.java)4
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/modelresource/TextEditorModelSharedResource.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/modelresource/TextEditorModelSharedResource.java)18
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/preferences/CDTPreferenceConstants.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/preferences/CDTPreferenceConstants.java)2
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/preferences/CDTPreferenceInitializer.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/preferences/CDTPreferenceInitializer.java)4
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/preferences/CDTPreferencePage.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/preferences/CDTPreferencePage.java)4
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/sync/RevealCurrentOperation.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/sync/RevealCurrentOperation.java)2
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/sync/SyncCDTtoModel.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/sync/SyncCDTtoModel.java)8
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/sync/SyncModelToCDT.java (renamed from extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/sync/SyncModelToCDT.java)2
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/.classpath (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/.classpath)0
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/.project28
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/META-INF/MANIFEST.MF (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/META-INF/MANIFEST.MF)8
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/about.html (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/about.html)0
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/build.properties (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/build.properties)0
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/model/texteditormodel.ecore (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/model/papyrustextinstance.ecore)6
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/model/texteditormodel.genmodel (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/model/papyrustextinstance.genmodel)18
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/plugin.pdoc (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/plugin.pdoc)0
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/plugin.properties (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/plugin.properties)0
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/plugin.xml (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/plugin.xml)9
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/TextEditorModel.java (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/PapyrusTextInstance.java)230
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/TextEditorModelFactory.java (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/PapyrustextinstanceFactory.java)104
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/TextEditorModelPackage.java (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/PapyrustextinstancePackage.java)452
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/impl/TextEditorModelFactoryImpl.java (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/impl/PapyrustextinstanceFactoryImpl.java)207
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/impl/TextEditorModelImpl.java (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/impl/PapyrusTextInstanceImpl.java)575
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/impl/TextEditorModelPackageImpl.java (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/impl/PapyrustextinstancePackageImpl.java)434
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/util/TextEditorModelAdapterFactory.java (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/util/PapyrustextinstanceAdapterFactory.java)295
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/util/TextEditorModelSwitch.java (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/util/PapyrustextinstanceSwitch.java)272
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/.classpath7
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/.project (renamed from extraplugins/codegen/org.eclipse.papyrus.text.instance/.project)56
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/META-INF/MANIFEST.MF27
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/about.html28
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/build.properties9
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/plugin.properties3
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/plugin.xml17
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorFacet.facetSet12
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorFacetCustomization.uiCustom17
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorInstanceCustomization.uiCustom28
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorQuery.querySet23
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/Activator.java69
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/GetContainedTextEditors.java70
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/GetTextEditorIcon.java31
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/GetTextEditorName.java32
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/IsTextEditorContainer.java52
64 files changed, 1874 insertions, 1401 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/icons/texteditor.bmp b/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/icons/texteditor.bmp
deleted file mode 100644
index 79df55de06b..00000000000
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/icons/texteditor.bmp
+++ /dev/null
Binary files differ
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/.classpath b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/.classpath
index 2d1a4302f04..2d1a4302f04 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/.classpath
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/.classpath
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/.project b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/.project
index 8fded7ec174..d1004a0c6d3 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/.project
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.papyrus.exteditor.cdt</name>
+ <name>org.eclipse.papyrus.texteditor.cdt</name>
<comment></comment>
<projects>
</projects>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/.settings/org.eclipse.jdt.core.prefs b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/.settings/org.eclipse.jdt.core.prefs
index 44217f8c068..44217f8c068 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/.settings/org.eclipse.jdt.core.prefs
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/.settings/org.eclipse.jdt.core.prefs
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/META-INF/MANIFEST.MF b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/META-INF/MANIFEST.MF
index 1a2220afb93..a365ea04a80 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/META-INF/MANIFEST.MF
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.papyrus.exteditor.cdt;singleton:=true
+Bundle-SymbolicName: org.eclipse.papyrus.texteditor.cdt;singleton:=true
Bundle-Version: 0.10.1.qualifier
-Bundle-Activator: org.eclipse.papyrus.exteditor.cdt.Activator
+Bundle-Activator: org.eclipse.papyrus.texteditor.cdt.Activator
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
@@ -25,10 +25,11 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.services.edit;bundle-version="0.10.1",
org.eclipse.papyrus.cpp.profile;bundle-version="0.10.1",
org.eclipse.papyrus.uml.tools;bundle-version="0.10.1",
- org.eclipse.papyrus.text.instance;bundle-version="0.9.0",
+ org.eclipse.papyrus.texteditor.model;bundle-version="0.9.0",
org.eclipse.ui.ide;bundle-version="3.9.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="0.10.1",
org.eclipse.papyrus.acceleo;bundle-version="0.10.1",
- org.eclipse.papyrus.infra.emf;bundle-version="0.10.1"
+ org.eclipse.papyrus.infra.emf;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.widgets;bundle-version="0.10.1"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/about.html b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/about.html
index 82d49bf5f81..82d49bf5f81 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/about.html
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/about.html
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/build.properties b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/build.properties
index 093ba6b8efe..093ba6b8efe 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/build.properties
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/build.properties
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/icons/texteditor.gif b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/icons/texteditor.gif
new file mode 100644
index 00000000000..c2679d94652
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/icons/texteditor.gif
Binary files differ
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/icons/texteditor.xcf b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/icons/texteditor.xcf
new file mode 100644
index 00000000000..6655b4120a9
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/icons/texteditor.xcf
Binary files differ
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/plugin.pdoc b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/plugin.pdoc
index 9bec7dbaf86..9bec7dbaf86 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/plugin.pdoc
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/plugin.pdoc
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/plugin.properties b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/plugin.properties
index 5078ac35841..5078ac35841 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/plugin.properties
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/plugin.properties
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/plugin.xml b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/plugin.xml
index 75cb1630116..c7c90c718ac 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/plugin.xml
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/plugin.xml
@@ -4,14 +4,14 @@
<extension
point="org.eclipse.papyrus.infra.core.model">
<model
- classname="org.eclipse.papyrus.exteditor.cdt.modelresource.TextEditorModelSharedResource">
+ classname="org.eclipse.papyrus.texteditor.cdt.modelresource.TextEditorModelSharedResource">
</model>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Open a CDT Editor"
- defaultHandler="org.eclipse.papyrus.exteditor.cdt.handler.PapyrusCDTEditorHandler"
+ defaultHandler="org.eclipse.papyrus.texteditor.cdt.handler.PapyrusCDTEditorHandler"
id="org.eclipse.papyrus.exteditor.cdt.openeditor"
name="Open a CDT Editor">
</command>
@@ -19,8 +19,8 @@
<extension
point="org.eclipse.papyrus.infra.core.papyrusDiagram">
<editorDiagram
- factoryClass="org.eclipse.papyrus.exteditor.cdt.factory.PapyrusCDTEditorFactory"
- icon="icons/texteditor.bmp">
+ factoryClass="org.eclipse.papyrus.texteditor.cdt.factory.PapyrusCDTEditorFactory"
+ icon="icons/texteditor.gif">
</editorDiagram>
</extension>
<extension
@@ -47,7 +47,7 @@
<command
commandId="org.eclipse.papyrus.exteditor.cdt.openeditor"
id="org.eclipse.papyrus.exteditor.cdt.open"
- icon="icons/texteditor.bmp"
+ icon="icons/texteditor.gif"
style="push">
<visibleWhen
checkEnabled="true">
@@ -59,7 +59,7 @@
point="org.eclipse.papyrus.infra.core.modelListener">
<listener
name="org.eclipse.papyrus.exteditor.cdt.listener.ModelListener"
- realization="org.eclipse.papyrus.exteditor.cdt.listener.ModelListener">
+ realization="org.eclipse.papyrus.texteditor.cdt.listener.ModelListener">
</listener>
</extension>
</plugin>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/Activator.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/Activator.java
index e62923e35ed..8d1fa7ecc4f 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/Activator.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/Activator.java
@@ -11,7 +11,7 @@
* Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt;
+package org.eclipse.papyrus.texteditor.cdt;
import org.eclipse.papyrus.infra.core.log.LogHelper;
import org.eclipse.ui.plugin.AbstractUIPlugin;
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/AddProfileAndModelLibsHandler.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/AddProfileAndModelLibsHandler.java
index d4f7ca43274..c46cb697105 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/AddProfileAndModelLibsHandler.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/AddProfileAndModelLibsHandler.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt;
+package org.eclipse.papyrus.texteditor.cdt;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.emf.common.command.CommandStack;
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/CommandSupport.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/CommandSupport.java
index 1b836e53028..84991f04bc0 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/CommandSupport.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/CommandSupport.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt;
+package org.eclipse.papyrus.texteditor.cdt;
import java.util.Collections;
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/Utils.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/Utils.java
index 2714526b284..c69a4cb25bc 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/Utils.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/Utils.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt;
+package org.eclipse.papyrus.texteditor.cdt;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.NamedElement;
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/editor/DelegatingSourceViewer.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/editor/DelegatingSourceViewer.java
index 13957e7185b..398e5bc675c 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/editor/DelegatingSourceViewer.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/editor/DelegatingSourceViewer.java
@@ -12,7 +12,7 @@
*
*****************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt.editor;
+package org.eclipse.papyrus.texteditor.cdt.editor;
import java.util.Iterator;
import java.util.List;
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/editor/PapyrusCDTEditor.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/editor/PapyrusCDTEditor.java
index 341037caa6e..813f11e5147 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/editor/PapyrusCDTEditor.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/editor/PapyrusCDTEditor.java
@@ -11,7 +11,7 @@
* Ansgar Radermacher (CEA LIST) Ansgar.Radermacher@cea.fr - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt.editor;
+package org.eclipse.papyrus.texteditor.cdt.editor;
import org.eclipse.cdt.codan.internal.ui.cxx.CodanCReconciler;
import org.eclipse.cdt.internal.ui.editor.CEditor;
@@ -28,17 +28,17 @@ import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.IVerticalRuler;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.papyrus.exteditor.cdt.Activator;
-import org.eclipse.papyrus.exteditor.cdt.sync.RevealCurrentOperation;
-import org.eclipse.papyrus.exteditor.cdt.sync.SyncCDTtoModel;
-import org.eclipse.papyrus.exteditor.cdt.sync.SyncModelToCDT;
import org.eclipse.papyrus.infra.core.lifecycleevents.DoSaveEvent;
import org.eclipse.papyrus.infra.core.lifecycleevents.ILifeCycleEventsProvider;
import org.eclipse.papyrus.infra.core.lifecycleevents.ISaveAndDirtyService;
import org.eclipse.papyrus.infra.core.lifecycleevents.ISaveEventListener;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance;
+import org.eclipse.papyrus.texteditor.cdt.Activator;
+import org.eclipse.papyrus.texteditor.cdt.sync.RevealCurrentOperation;
+import org.eclipse.papyrus.texteditor.cdt.sync.SyncCDTtoModel;
+import org.eclipse.papyrus.texteditor.cdt.sync.SyncModelToCDT;
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.FocusListener;
@@ -65,7 +65,7 @@ public class PapyrusCDTEditor extends CEditor {
protected final ServicesRegistry registry;
/** the papyrus text instance */
- protected final PapyrusTextInstance papyrusTextInstance;
+ protected final TextEditorModel papyrusTextInstance;
/** the text listener */
protected FocusListener focusListener;
@@ -85,7 +85,7 @@ public class PapyrusCDTEditor extends CEditor {
* @param registry
* @param papyrusTextInstance
*/
- public PapyrusCDTEditor(final ServicesRegistry registry, final PapyrusTextInstance papyrusTextInstance) {
+ public PapyrusCDTEditor(final ServicesRegistry registry, final TextEditorModel papyrusTextInstance) {
super();
this.registry = registry;
this.papyrusTextInstance = papyrusTextInstance;
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/factory/PapyrusCDTEditorFactory.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/factory/PapyrusCDTEditorFactory.java
index 9b6589dcf2c..408fd604291 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/factory/PapyrusCDTEditorFactory.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/factory/PapyrusCDTEditorFactory.java
@@ -9,14 +9,11 @@
*
* Contributors:
* Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
- * Ansgar Radermacher (CEA LIST) - Minor adaptions
+ * Ansgar Radermacher (CEA LIST) - Minor adaptations
*
*****************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt.factory;
+package org.eclipse.papyrus.texteditor.cdt.factory;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.exteditor.cdt.Activator;
-import org.eclipse.papyrus.exteditor.cdt.editor.PapyrusCDTEditor;
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;
@@ -24,7 +21,9 @@ 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.text.instance.papyrustextinstance.PapyrusTextInstance;
+import org.eclipse.papyrus.texteditor.cdt.Activator;
+import org.eclipse.papyrus.texteditor.cdt.editor.PapyrusCDTEditor;
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PartInitException;
@@ -50,7 +49,7 @@ public class PapyrusCDTEditorFactory extends AbstractEditorFactory {
* @return A model implementing the IPageModel
*/
public IPageModel createIPageModel(Object pageIdentifier) {
- return new TextEditorModel(pageIdentifier, getServiceRegistry());
+ return new TextEditorModelDelegate(pageIdentifier, getServiceRegistry());
}
/**
@@ -60,8 +59,8 @@ public class PapyrusCDTEditorFactory extends AbstractEditorFactory {
* @return
*/
public boolean isPageModelFactoryFor(Object pageIdentifier) {
- if(pageIdentifier instanceof PapyrusTextInstance) {
- return ((PapyrusTextInstance)pageIdentifier).getType().equals(this.getExpectedType());
+ if(pageIdentifier instanceof TextEditorModel) {
+ return ((TextEditorModel)pageIdentifier).getType().equals(this.getExpectedType());
}
return false;
}
@@ -70,7 +69,7 @@ public class PapyrusCDTEditorFactory extends AbstractEditorFactory {
* IEditorModel used internally by the SashContainer. This model know how to handle IEditor creation.
*
*/
- class TextEditorModel implements IEditorModel {
+ class TextEditorModelDelegate implements IEditorModel {
/**
@@ -86,14 +85,14 @@ public class PapyrusCDTEditorFactory extends AbstractEditorFactory {
/**
* The raw model stored in the SashProvider.
*/
- private PapyrusTextInstance rawModel;
+ private TextEditorModel rawModel;
/**
*
* Constructor.
*/
- public TextEditorModel(Object pageIdentifier, ServicesRegistry servicesRegistry) {
- rawModel = (PapyrusTextInstance)pageIdentifier;
+ public TextEditorModelDelegate(Object pageIdentifier, ServicesRegistry servicesRegistry) {
+ rawModel = (TextEditorModel)pageIdentifier;
this.servicesRegistry = servicesRegistry;
}
@@ -108,7 +107,7 @@ public class PapyrusCDTEditorFactory extends AbstractEditorFactory {
public IEditorPart createIEditorPart() throws PartInitException {
try {
//we use this way when there is one factory for several editor types
- // Constructor<?> c = getDiagramClass().getConstructor(ServicesRegistry.class, PapyrusTextInstance.class);
+ // Constructor<?> c = getDiagramClass().getConstructor(ServicesRegistry.class, TextEditorModel.class);
// editor = (IEditorPart)c.newInstance(servicesRegistry, rawModel);
//we use this way when there is only one editor type
@@ -179,13 +178,12 @@ public class PapyrusCDTEditorFactory extends AbstractEditorFactory {
*
*/
public Image getTabIcon() {
- ImageDescriptor imageDescriptor = getEditorDescriptor().getIcon();
- if(imageDescriptor == null) {
+ org.eclipse.papyrus.infra.widgets.Activator widgetsActivator =
+ org.eclipse.papyrus.infra.widgets.Activator.getDefault();
+ if(widgetsActivator == null) {
return null;
}
- // TODO: leaks memory!
- System.err.println("create image (leak!");
- return imageDescriptor.createImage();
+ return widgetsActivator.getImage(Activator.PLUGIN_ID, getEditorDescriptor().getIconURL());
}
/**
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/handler/PapyrusCDTEditorHandler.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java
index 1d8b23cc0b8..18c12af6763 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/handler/PapyrusCDTEditorHandler.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/handler/PapyrusCDTEditorHandler.java
@@ -12,7 +12,7 @@
* Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr
*
*****************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt.handler;
+package org.eclipse.papyrus.texteditor.cdt.handler;
import java.util.ArrayList;
import java.util.List;
@@ -31,17 +31,17 @@ import org.eclipse.emf.workspace.AbstractEMFOperation;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.commands.CheckedOperationHistory;
-import org.eclipse.papyrus.exteditor.cdt.Activator;
-import org.eclipse.papyrus.exteditor.cdt.editor.PapyrusCDTEditor;
-import org.eclipse.papyrus.exteditor.cdt.modelresource.TextEditorModelSharedResource;
import org.eclipse.papyrus.infra.core.resource.NotFoundException;
import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
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.emf.utils.ServiceUtilsForHandlers;
-import org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance;
-import org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrustextinstanceFactory;
+import org.eclipse.papyrus.texteditor.cdt.Activator;
+import org.eclipse.papyrus.texteditor.cdt.editor.PapyrusCDTEditor;
+import org.eclipse.papyrus.texteditor.cdt.modelresource.TextEditorModelSharedResource;
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel;
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModelFactory;
import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.DataType;
@@ -183,7 +183,7 @@ public class PapyrusCDTEditorHandler extends AbstractHandler {
* The model where to save the TableInstance is not found.
*/
protected Object createEditorModel(final ServicesRegistry serviceRegistry) throws ServiceException, NotFoundException {
- PapyrusTextInstance editorModel = PapyrustextinstanceFactory.eINSTANCE.createPapyrusTextInstance();
+ TextEditorModel editorModel = TextEditorModelFactory.eINSTANCE.createTextEditorModel();
EObject editedObject = getSelection().get(0);
editorModel.setEditedObject(editedObject);
editorModel.setType(PapyrusCDTEditor.EDITOR_TYPE);
@@ -195,7 +195,7 @@ public class PapyrusCDTEditorHandler extends AbstractHandler {
}
TextEditorModelSharedResource model = (TextEditorModelSharedResource)
ServiceUtils.getInstance().getModelSet(serviceRegistry).getModelChecked(TextEditorModelSharedResource.MODEL_ID);
- model.addPapyrusTextInstance(editorModel);
+ model.addTextEditorModel(editorModel);
return editorModel;
}
@@ -204,6 +204,6 @@ public class PapyrusCDTEditorHandler extends AbstractHandler {
TextEditorModelSharedResource model = (TextEditorModelSharedResource)
ServiceUtils.getInstance().getModelSet(serviceRegistry).getModelChecked(TextEditorModelSharedResource.MODEL_ID);
EObject editedObject = getSelection().get(0);
- return model.getPapyrusTextInstance(editedObject);
+ return model.getTextEditorModel(editedObject);
}
}
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/listener/ModelListener.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/listener/ModelListener.java
index d295c10fe52..2f8b3380b20 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/listener/ModelListener.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/listener/ModelListener.java
@@ -12,7 +12,7 @@
*
*****************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt.listener;
+package org.eclipse.papyrus.texteditor.cdt.listener;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/listener/OperationHistoryListener.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/listener/OperationHistoryListener.java
index 80311bbcbe4..5c66aba4cb0 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/listener/OperationHistoryListener.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/listener/OperationHistoryListener.java
@@ -12,14 +12,14 @@
*
*****************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt.listener;
+package org.eclipse.papyrus.texteditor.cdt.listener;
import org.eclipse.core.commands.operations.IOperationHistoryListener;
import org.eclipse.core.commands.operations.OperationHistoryEvent;
import org.eclipse.core.commands.operations.OperationHistoryFactory;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
-import org.eclipse.papyrus.exteditor.cdt.sync.SyncModelToCDT;
+import org.eclipse.papyrus.texteditor.cdt.sync.SyncModelToCDT;
import org.eclipse.uml2.uml.Classifier;
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/modelresource/TextEditorModelSharedResource.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/modelresource/TextEditorModelSharedResource.java
index 7a5bd9786aa..04fc890567a 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/modelresource/TextEditorModelSharedResource.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/modelresource/TextEditorModelSharedResource.java
@@ -11,15 +11,15 @@
* Vincent Lorenzo (CEA LIST) Vincent.Lorenzo@cea.fr - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt.modelresource;
+package org.eclipse.papyrus.texteditor.cdt.modelresource;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.infra.core.resource.AbstractModelWithSharedResource;
import org.eclipse.papyrus.infra.core.resource.IModel;
-import org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance;
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel;
-public class TextEditorModelSharedResource extends AbstractModelWithSharedResource<PapyrusTextInstance> implements IModel {
+public class TextEditorModelSharedResource extends AbstractModelWithSharedResource<TextEditorModel> implements IModel {
/**
@@ -69,12 +69,12 @@ public class TextEditorModelSharedResource extends AbstractModelWithSharedResour
/**
- * Add a new initialized {@link PapyrusTextInstance} to the model.
+ * Add a new initialized {@link TextEditorModel} to the model.
*
* @param textInstance
* The textInstance to add.
*/
- public void addPapyrusTextInstance(PapyrusTextInstance textInstance) {
+ public void addTextEditorModel(TextEditorModel textInstance) {
getResource().getContents().add(textInstance);
}
@@ -84,7 +84,7 @@ public class TextEditorModelSharedResource extends AbstractModelWithSharedResour
* @param textInstance
* The textInstance to add.
*/
- public void removePapyrusTextInstance(PapyrusTextInstance textInstance) {
+ public void removeTextEditorModel(TextEditorModel textInstance) {
getResource().getContents().remove(textInstance);
}
@@ -93,10 +93,10 @@ public class TextEditorModelSharedResource extends AbstractModelWithSharedResour
* @return an editor reference for a given object if an editor exists, or null
*/
- public PapyrusTextInstance getPapyrusTextInstance(EObject editedObject) {
+ public TextEditorModel getTextEditorModel(EObject editedObject) {
for (EObject textInstanceEO : getResource().getContents()) {
- if (textInstanceEO instanceof PapyrusTextInstance) {
- PapyrusTextInstance textInstance = (PapyrusTextInstance) textInstanceEO;
+ if (textInstanceEO instanceof TextEditorModel) {
+ TextEditorModel textInstance = (TextEditorModel) textInstanceEO;
if (textInstance.getEditedObject() == editedObject) {
return textInstance;
}
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/preferences/CDTPreferenceConstants.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/preferences/CDTPreferenceConstants.java
index 8d5c410ba1a..bbd1cd272e1 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/preferences/CDTPreferenceConstants.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/preferences/CDTPreferenceConstants.java
@@ -11,7 +11,7 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt.preferences;
+package org.eclipse.papyrus.texteditor.cdt.preferences;
/**
* Constant definitions for plug-in preferences
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/preferences/CDTPreferenceInitializer.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/preferences/CDTPreferenceInitializer.java
index a48b9508fee..a033b351b6b 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/preferences/CDTPreferenceInitializer.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/preferences/CDTPreferenceInitializer.java
@@ -12,11 +12,11 @@
*
*****************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt.preferences;
+package org.eclipse.papyrus.texteditor.cdt.preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.exteditor.cdt.Activator;
+import org.eclipse.papyrus.texteditor.cdt.Activator;
/**
* Class used to initialize default preference values.
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/preferences/CDTPreferencePage.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/preferences/CDTPreferencePage.java
index e0ee5577c82..31443c22656 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/preferences/CDTPreferencePage.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/preferences/CDTPreferencePage.java
@@ -11,11 +11,11 @@
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt.preferences;
+package org.eclipse.papyrus.texteditor.cdt.preferences;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.papyrus.exteditor.cdt.Activator;
+import org.eclipse.papyrus.texteditor.cdt.Activator;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/sync/RevealCurrentOperation.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/sync/RevealCurrentOperation.java
index 6d91e771112..4b8d172a546 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/sync/RevealCurrentOperation.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/sync/RevealCurrentOperation.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt.sync;
+package org.eclipse.papyrus.texteditor.cdt.sync;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.dom.ast.IASTNodeSelector;
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/sync/SyncCDTtoModel.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/sync/SyncCDTtoModel.java
index f88b2b532d4..62acbdeb8da 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/sync/SyncCDTtoModel.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/sync/SyncCDTtoModel.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt.sync;
+package org.eclipse.papyrus.texteditor.cdt.sync;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.dom.ast.ExpansionOverlapsBoundaryException;
@@ -49,9 +49,9 @@ import org.eclipse.papyrus.C_Cpp.Ptr;
import org.eclipse.papyrus.C_Cpp.Ref;
import org.eclipse.papyrus.cpp.codegen.Constants;
import org.eclipse.papyrus.cpp.profile.StUtils;
-import org.eclipse.papyrus.exteditor.cdt.CommandSupport;
-import org.eclipse.papyrus.exteditor.cdt.Utils;
-import org.eclipse.papyrus.exteditor.cdt.listener.ModelListener;
+import org.eclipse.papyrus.texteditor.cdt.CommandSupport;
+import org.eclipse.papyrus.texteditor.cdt.Utils;
+import org.eclipse.papyrus.texteditor.cdt.listener.ModelListener;
import org.eclipse.ui.IEditorInput;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
diff --git a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/sync/SyncModelToCDT.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/sync/SyncModelToCDT.java
index 4ef45efc370..ed62d44b6b8 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.exteditor.cdt/src/org/eclipse/papyrus/exteditor/cdt/sync/SyncModelToCDT.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/sync/SyncModelToCDT.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.papyrus.exteditor.cdt.sync;
+package org.eclipse.papyrus.texteditor.cdt.sync;
import org.eclipse.cdt.core.CCProjectNature;
import org.eclipse.cdt.core.CProjectNature;
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/.classpath b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/.classpath
index 45f024e850e..45f024e850e 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/.classpath
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/.classpath
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/.project b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/.project
new file mode 100644
index 00000000000..166c5980713
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.texteditor.model</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/extraplugins/codegen/org.eclipse.papyrus.text.instance/META-INF/MANIFEST.MF b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/META-INF/MANIFEST.MF
index 069d7fb30a8..086957d6b4f 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/META-INF/MANIFEST.MF
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.text.instance.papyrustextinstance,
- org.eclipse.papyrus.text.instance.papyrustextinstance.impl,
- org.eclipse.papyrus.text.instance.papyrustextinstance.util
+Export-Package: org.eclipse.papyrus.texteditor.model.texteditormodel,
+ org.eclipse.papyrus.texteditor.model.texteditormodel.impl,
+ org.eclipse.papyrus.texteditor.model.texteditormodel.util
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport
Bundle-Vendor: %providerName
@@ -11,6 +11,6 @@ Bundle-Version: 0.10.1.qualifier
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.text.instance;singleton:=true
+Bundle-SymbolicName: org.eclipse.papyrus.texteditor.model;singleton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/about.html b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/about.html
index 82d49bf5f81..82d49bf5f81 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/about.html
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/about.html
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/build.properties b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/build.properties
index 6672f2400bf..6672f2400bf 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/build.properties
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/build.properties
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/model/papyrustextinstance.ecore b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/model/texteditormodel.ecore
index 1efefbcdd3e..37ec2b29e9e 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/model/papyrustextinstance.ecore
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/model/texteditormodel.ecore
@@ -1,8 +1,8 @@
<?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="papyrustextinstance" nsURI="http://www.eclipse.org/Papyrus/Example/0.9.0/papyrustextinstance"
- nsPrefix="papyrustextinstance">
- <eClassifiers xsi:type="ecore:EClass" name="PapyrusTextInstance" eSuperTypes="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="texteditormodel" nsURI="http://www.eclipse.org/Papyrus/Example/0.10.0/texteditormodel"
+ nsPrefix="texteditormodel">
+ <eClassifiers xsi:type="ecore:EClass" name="TextEditorModel" eSuperTypes="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="editedObject" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/model/papyrustextinstance.genmodel b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/model/texteditormodel.genmodel
index 02d981047ff..371abd0640c 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/model/papyrustextinstance.genmodel
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/model/texteditormodel.genmodel
@@ -1,16 +1,16 @@
<?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; 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&#xD;&#xA;"
- modelDirectory="/org.eclipse.papyrus.example.text.instance/src" modelPluginID="org.eclipse.papyrus.example.text.instance"
- modelName="Papyrustextinstance" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"
+ modelDirectory="/org.eclipse.papyrus.texteditor.model/src" modelPluginID="org.eclipse.papyrus.texteditor.model"
+ modelName="TextEditorModel" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"
copyrightFields="false" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">
- <foreignModel>papyrustextinstance.ecore</foreignModel>
- <genPackages prefix="Papyrustextinstance" basePackage="org.eclipse.papyrus.example.test.instance"
- disposableProviderFactory="true" ecorePackage="papyrustextinstance.ecore#/">
- <genClasses ecoreClass="papyrustextinstance.ecore#//PapyrusTextInstance">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference papyrustextinstance.ecore#//PapyrusTextInstance/editedObject"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute papyrustextinstance.ecore#//PapyrusTextInstance/type"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute papyrustextinstance.ecore#//PapyrusTextInstance/name"/>
+ <foreignModel>texteditormodel.ecore</foreignModel>
+ <genPackages prefix="TextEditorModel" basePackage="org.eclipse.papyrus.texteditor.model"
+ disposableProviderFactory="true" ecorePackage="texteditormodel.ecore#/">
+ <genClasses ecoreClass="texteditormodel.ecore#//TextEditorModel">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference texteditormodel.ecore#//TextEditorModel/editedObject"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute texteditormodel.ecore#//TextEditorModel/type"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute texteditormodel.ecore#//TextEditorModel/name"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/plugin.pdoc b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/plugin.pdoc
index e59da2f931a..e59da2f931a 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/plugin.pdoc
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/plugin.pdoc
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/plugin.properties b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/plugin.properties
index fa4bae9bc58..fa4bae9bc58 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/plugin.properties
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/plugin.properties
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/plugin.xml b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/plugin.xml
index deae8c3f932..444ce844d4c 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/plugin.xml
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/plugin.xml
@@ -10,7 +10,8 @@
http://www.eclipse.org/legal/epl-v10.html
Contributors:
- Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ Ansgar Radermacher (CEA-LIST) ansgar.radermacher@cea.fr - Initial API and implementation
+ (derived from code from Vincent Lorenzo)
-->
@@ -18,9 +19,9 @@
<extension point="org.eclipse.emf.ecore.generated_package">
<package
- uri="http://www.eclipse.org/Papyrus/Example/0.9.0/papyrustextinstance"
- class="org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrustextinstancePackage"
- genModel="model/papyrustextinstance.genmodel"/>
+ uri="http://www.eclipse.org/Papyrus/Text/0.10.0/texteditormodel"
+ class="org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModelPackage"
+ genModel="model/texteditormodel.genmodel"/>
</extension>
</plugin>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/PapyrusTextInstance.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/TextEditorModel.java
index 33d867f5e0a..ab1609add7c 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/PapyrusTextInstance.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/TextEditorModel.java
@@ -1,115 +1,115 @@
-/**
- * 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.text.instance.papyrustextinstance;
-
-import org.eclipse.emf.ecore.EModelElement;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Papyrus Text Instance</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance#getEditedObject <em>Edited Object</em>}</li>
- * <li>{@link org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance#getType <em>Type</em>}</li>
- * <li>{@link org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrustextinstancePackage#getPapyrusTextInstance()
- * @model
- * @generated
- */
-public interface PapyrusTextInstance extends EModelElement {
- /**
- * Returns the value of the '<em><b>Edited Object</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Edited Object</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Edited Object</em>' reference.
- * @see #setEditedObject(EObject)
- * @see org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrustextinstancePackage#getPapyrusTextInstance_EditedObject()
- * @model
- * @generated
- */
- EObject getEditedObject();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance#getEditedObject <em>Edited Object</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Edited Object</em>' reference.
- * @see #getEditedObject()
- * @generated
- */
- void setEditedObject(EObject value);
-
- /**
- * Returns the value of the '<em><b>Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Type</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Type</em>' attribute.
- * @see #setType(String)
- * @see org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrustextinstancePackage#getPapyrusTextInstance_Type()
- * @model
- * @generated
- */
- String getType();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance#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>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrustextinstancePackage#getPapyrusTextInstance_Name()
- * @model
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance#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);
-
-} // PapyrusTextInstance
+/**
+ * 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.texteditor.model.texteditormodel;
+
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Text Editor Model</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel#getEditedObject <em>Edited Object</em>}</li>
+ * <li>{@link org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModelPackage#getTextEditorModel()
+ * @model
+ * @generated
+ */
+public interface TextEditorModel extends EModelElement {
+ /**
+ * Returns the value of the '<em><b>Edited Object</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Edited Object</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Edited Object</em>' reference.
+ * @see #setEditedObject(EObject)
+ * @see org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModelPackage#getTextEditorModel_EditedObject()
+ * @model
+ * @generated
+ */
+ EObject getEditedObject();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel#getEditedObject <em>Edited Object</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Edited Object</em>' reference.
+ * @see #getEditedObject()
+ * @generated
+ */
+ void setEditedObject(EObject value);
+
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Type</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Type</em>' attribute.
+ * @see #setType(String)
+ * @see org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModelPackage#getTextEditorModel_Type()
+ * @model
+ * @generated
+ */
+ String getType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel#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>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModelPackage#getTextEditorModel_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel#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);
+
+} // TextEditorModel
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/PapyrustextinstanceFactory.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/TextEditorModelFactory.java
index be18026dbb9..f916e6cf2c9 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/PapyrustextinstanceFactory.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/TextEditorModelFactory.java
@@ -1,52 +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
- * 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.text.instance.papyrustextinstance;
-
-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.text.instance.papyrustextinstance.PapyrustextinstancePackage
- * @generated
- */
-public interface PapyrustextinstanceFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- PapyrustextinstanceFactory eINSTANCE = org.eclipse.papyrus.text.instance.papyrustextinstance.impl.PapyrustextinstanceFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Papyrus Text Instance</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Papyrus Text Instance</em>'.
- * @generated
- */
- PapyrusTextInstance createPapyrusTextInstance();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- PapyrustextinstancePackage getPapyrustextinstancePackage();
-
-} //PapyrustextinstanceFactory
+/**
+ * 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.texteditor.model.texteditormodel;
+
+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.texteditor.model.texteditormodel.TextEditorModelPackage
+ * @generated
+ */
+public interface TextEditorModelFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ TextEditorModelFactory eINSTANCE = org.eclipse.papyrus.texteditor.model.texteditormodel.impl.TextEditorModelFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Text Editor Model</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Text Editor Model</em>'.
+ * @generated
+ */
+ TextEditorModel createTextEditorModel();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ TextEditorModelPackage getTextEditorModelPackage();
+
+} //TextEditorModelFactory
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/PapyrustextinstancePackage.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/TextEditorModelPackage.java
index 6a6f63401b6..d7220ce9d85 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/PapyrustextinstancePackage.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/TextEditorModelPackage.java
@@ -1,226 +1,226 @@
-/**
- * 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.text.instance.papyrustextinstance;
-
-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 -->
- * @see org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrustextinstanceFactory
- * @model kind="package"
- * @generated
- */
-public interface PapyrustextinstancePackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "papyrustextinstance";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.eclipse.org/Papyrus/Example/0.9.0/papyrustextinstance";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "papyrustextinstance";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- PapyrustextinstancePackage eINSTANCE = org.eclipse.papyrus.text.instance.papyrustextinstance.impl.PapyrustextinstancePackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.papyrus.text.instance.papyrustextinstance.impl.PapyrusTextInstanceImpl <em>Papyrus Text Instance</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.text.instance.papyrustextinstance.impl.PapyrusTextInstanceImpl
- * @see org.eclipse.papyrus.text.instance.papyrustextinstance.impl.PapyrustextinstancePackageImpl#getPapyrusTextInstance()
- * @generated
- */
- int PAPYRUS_TEXT_INSTANCE = 0;
-
- /**
- * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PAPYRUS_TEXT_INSTANCE__EANNOTATIONS = EcorePackage.EMODEL_ELEMENT__EANNOTATIONS;
-
- /**
- * The feature id for the '<em><b>Edited Object</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT = 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_TEXT_INSTANCE__TYPE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PAPYRUS_TEXT_INSTANCE__NAME = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Papyrus Text Instance</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PAPYRUS_TEXT_INSTANCE_FEATURE_COUNT = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 3;
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance <em>Papyrus Text Instance</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Papyrus Text Instance</em>'.
- * @see org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance
- * @generated
- */
- EClass getPapyrusTextInstance();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance#getEditedObject <em>Edited Object</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Edited Object</em>'.
- * @see org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance#getEditedObject()
- * @see #getPapyrusTextInstance()
- * @generated
- */
- EReference getPapyrusTextInstance_EditedObject();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance#getType <em>Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Type</em>'.
- * @see org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance#getType()
- * @see #getPapyrusTextInstance()
- * @generated
- */
- EAttribute getPapyrusTextInstance_Type();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance#getName()
- * @see #getPapyrusTextInstance()
- * @generated
- */
- EAttribute getPapyrusTextInstance_Name();
-
- /**
- * 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
- */
- PapyrustextinstanceFactory getPapyrustextinstanceFactory();
-
- /**
- * <!-- 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.text.instance.papyrustextinstance.impl.PapyrusTextInstanceImpl <em>Papyrus Text Instance</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.papyrus.text.instance.papyrustextinstance.impl.PapyrusTextInstanceImpl
- * @see org.eclipse.papyrus.text.instance.papyrustextinstance.impl.PapyrustextinstancePackageImpl#getPapyrusTextInstance()
- * @generated
- */
- EClass PAPYRUS_TEXT_INSTANCE = eINSTANCE.getPapyrusTextInstance();
-
- /**
- * The meta object literal for the '<em><b>Edited Object</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT = eINSTANCE.getPapyrusTextInstance_EditedObject();
-
- /**
- * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute PAPYRUS_TEXT_INSTANCE__TYPE = eINSTANCE.getPapyrusTextInstance_Type();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute PAPYRUS_TEXT_INSTANCE__NAME = eINSTANCE.getPapyrusTextInstance_Name();
-
- }
-
-} //PapyrustextinstancePackage
+/**
+ * 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.texteditor.model.texteditormodel;
+
+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 -->
+ * @see org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModelFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface TextEditorModelPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "texteditormodel";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/Papyrus/Example/0.10.0/texteditormodel";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "texteditormodel";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ TextEditorModelPackage eINSTANCE = org.eclipse.papyrus.texteditor.model.texteditormodel.impl.TextEditorModelPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.texteditor.model.texteditormodel.impl.TextEditorModelImpl <em>Text Editor Model</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.texteditor.model.texteditormodel.impl.TextEditorModelImpl
+ * @see org.eclipse.papyrus.texteditor.model.texteditormodel.impl.TextEditorModelPackageImpl#getTextEditorModel()
+ * @generated
+ */
+ int TEXT_EDITOR_MODEL = 0;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TEXT_EDITOR_MODEL__EANNOTATIONS = EcorePackage.EMODEL_ELEMENT__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Edited Object</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TEXT_EDITOR_MODEL__EDITED_OBJECT = 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 TEXT_EDITOR_MODEL__TYPE = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TEXT_EDITOR_MODEL__NAME = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Text Editor Model</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TEXT_EDITOR_MODEL_FEATURE_COUNT = EcorePackage.EMODEL_ELEMENT_FEATURE_COUNT + 3;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel <em>Text Editor Model</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Text Editor Model</em>'.
+ * @see org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel
+ * @generated
+ */
+ EClass getTextEditorModel();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel#getEditedObject <em>Edited Object</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Edited Object</em>'.
+ * @see org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel#getEditedObject()
+ * @see #getTextEditorModel()
+ * @generated
+ */
+ EReference getTextEditorModel_EditedObject();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Type</em>'.
+ * @see org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel#getType()
+ * @see #getTextEditorModel()
+ * @generated
+ */
+ EAttribute getTextEditorModel_Type();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel#getName()
+ * @see #getTextEditorModel()
+ * @generated
+ */
+ EAttribute getTextEditorModel_Name();
+
+ /**
+ * 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
+ */
+ TextEditorModelFactory getTextEditorModelFactory();
+
+ /**
+ * <!-- 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.texteditor.model.texteditormodel.impl.TextEditorModelImpl <em>Text Editor Model</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.texteditor.model.texteditormodel.impl.TextEditorModelImpl
+ * @see org.eclipse.papyrus.texteditor.model.texteditormodel.impl.TextEditorModelPackageImpl#getTextEditorModel()
+ * @generated
+ */
+ EClass TEXT_EDITOR_MODEL = eINSTANCE.getTextEditorModel();
+
+ /**
+ * The meta object literal for the '<em><b>Edited Object</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TEXT_EDITOR_MODEL__EDITED_OBJECT = eINSTANCE.getTextEditorModel_EditedObject();
+
+ /**
+ * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute TEXT_EDITOR_MODEL__TYPE = eINSTANCE.getTextEditorModel_Type();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute TEXT_EDITOR_MODEL__NAME = eINSTANCE.getTextEditorModel_Name();
+
+ }
+
+} //TextEditorModelPackage
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/impl/PapyrustextinstanceFactoryImpl.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/impl/TextEditorModelFactoryImpl.java
index f61e443eb84..7119847cdd3 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/impl/PapyrustextinstanceFactoryImpl.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/impl/TextEditorModelFactoryImpl.java
@@ -1,102 +1,105 @@
-/**
- * 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.text.instance.papyrustextinstance.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.text.instance.papyrustextinstance.*;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class PapyrustextinstanceFactoryImpl extends EFactoryImpl implements PapyrustextinstanceFactory {
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static PapyrustextinstanceFactory init() {
- try {
- PapyrustextinstanceFactory thePapyrustextinstanceFactory = (PapyrustextinstanceFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/Papyrus/Example/0.9.0/papyrustextinstance");
- if (thePapyrustextinstanceFactory != null) {
- return thePapyrustextinstanceFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new PapyrustextinstanceFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PapyrustextinstanceFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE: return createPapyrusTextInstance();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PapyrusTextInstance createPapyrusTextInstance() {
- PapyrusTextInstanceImpl papyrusTextInstance = new PapyrusTextInstanceImpl();
- return papyrusTextInstance;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PapyrustextinstancePackage getPapyrustextinstancePackage() {
- return (PapyrustextinstancePackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static PapyrustextinstancePackage getPackage() {
- return PapyrustextinstancePackage.eINSTANCE;
- }
-
-} //PapyrustextinstanceFactoryImpl
+/**
+ * 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.texteditor.model.texteditormodel.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.texteditor.model.texteditormodel.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TextEditorModelFactoryImpl extends EFactoryImpl implements TextEditorModelFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static TextEditorModelFactory init() {
+ try {
+ TextEditorModelFactory theTextEditorModelFactory = (TextEditorModelFactory)EPackage.Registry.INSTANCE.getEFactory(TextEditorModelPackage.eNS_URI);
+ if (theTextEditorModelFactory != null) {
+ return theTextEditorModelFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new TextEditorModelFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TextEditorModelFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case TextEditorModelPackage.TEXT_EDITOR_MODEL: return createTextEditorModel();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TextEditorModel createTextEditorModel() {
+ TextEditorModelImpl textEditorModel = new TextEditorModelImpl();
+ return textEditorModel;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TextEditorModelPackage getTextEditorModelPackage() {
+ return (TextEditorModelPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static TextEditorModelPackage getPackage() {
+ return TextEditorModelPackage.eINSTANCE;
+ }
+
+} //TextEditorModelFactoryImpl
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/impl/PapyrusTextInstanceImpl.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/impl/TextEditorModelImpl.java
index 282c9c04941..fc2a229721d 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/impl/PapyrusTextInstanceImpl.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/impl/TextEditorModelImpl.java
@@ -1,286 +1,289 @@
-/**
- * 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.text.instance.papyrustextinstance.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.EModelElementImpl;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance;
-import org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrustextinstancePackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Papyrus Text Instance</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.papyrus.text.instance.papyrustextinstance.impl.PapyrusTextInstanceImpl#getEditedObject <em>Edited Object</em>}</li>
- * <li>{@link org.eclipse.papyrus.text.instance.papyrustextinstance.impl.PapyrusTextInstanceImpl#getType <em>Type</em>}</li>
- * <li>{@link org.eclipse.papyrus.text.instance.papyrustextinstance.impl.PapyrusTextInstanceImpl#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class PapyrusTextInstanceImpl extends EModelElementImpl implements PapyrusTextInstance {
- /**
- * The cached value of the '{@link #getEditedObject() <em>Edited Object</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEditedObject()
- * @generated
- * @ordered
- */
- protected EObject editedObject;
-
- /**
- * 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 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;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PapyrusTextInstanceImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return PapyrustextinstancePackage.Literals.PAPYRUS_TEXT_INSTANCE;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject getEditedObject() {
- if (editedObject != null && editedObject.eIsProxy()) {
- InternalEObject oldEditedObject = (InternalEObject)editedObject;
- editedObject = eResolveProxy(oldEditedObject);
- if (editedObject != oldEditedObject) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT, oldEditedObject, editedObject));
- }
- }
- return editedObject;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetEditedObject() {
- return editedObject;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setEditedObject(EObject newEditedObject) {
- EObject oldEditedObject = editedObject;
- editedObject = newEditedObject;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT, oldEditedObject, editedObject));
- }
-
- /**
- * <!-- 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, PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__TYPE, oldType, type));
- }
-
- /**
- * <!-- 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, PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT:
- if (resolve) return getEditedObject();
- return basicGetEditedObject();
- case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__TYPE:
- return getType();
- case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__NAME:
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT:
- setEditedObject((EObject)newValue);
- return;
- case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__TYPE:
- setType((String)newValue);
- return;
- case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__NAME:
- setName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT:
- setEditedObject((EObject)null);
- return;
- case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__TYPE:
- setType(TYPE_EDEFAULT);
- return;
- case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__NAME:
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT:
- return editedObject != null;
- case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__TYPE:
- return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
- case PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- 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(" (type: ");
- result.append(type);
- result.append(", name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
-} //PapyrusTextInstanceImpl
+/**
+ * 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.texteditor.model.texteditormodel.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.EModelElementImpl;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel;
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModelPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Text Editor Model</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.texteditor.model.texteditormodel.impl.TextEditorModelImpl#getEditedObject <em>Edited Object</em>}</li>
+ * <li>{@link org.eclipse.papyrus.texteditor.model.texteditormodel.impl.TextEditorModelImpl#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.papyrus.texteditor.model.texteditormodel.impl.TextEditorModelImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TextEditorModelImpl extends EModelElementImpl implements TextEditorModel {
+ /**
+ * The cached value of the '{@link #getEditedObject() <em>Edited Object</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEditedObject()
+ * @generated
+ * @ordered
+ */
+ protected EObject editedObject;
+
+ /**
+ * 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 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;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TextEditorModelImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TextEditorModelPackage.Literals.TEXT_EDITOR_MODEL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject getEditedObject() {
+ if (editedObject != null && editedObject.eIsProxy()) {
+ InternalEObject oldEditedObject = (InternalEObject)editedObject;
+ editedObject = eResolveProxy(oldEditedObject);
+ if (editedObject != oldEditedObject) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, TextEditorModelPackage.TEXT_EDITOR_MODEL__EDITED_OBJECT, oldEditedObject, editedObject));
+ }
+ }
+ return editedObject;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject basicGetEditedObject() {
+ return editedObject;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setEditedObject(EObject newEditedObject) {
+ EObject oldEditedObject = editedObject;
+ editedObject = newEditedObject;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TextEditorModelPackage.TEXT_EDITOR_MODEL__EDITED_OBJECT, oldEditedObject, editedObject));
+ }
+
+ /**
+ * <!-- 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, TextEditorModelPackage.TEXT_EDITOR_MODEL__TYPE, oldType, type));
+ }
+
+ /**
+ * <!-- 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, TextEditorModelPackage.TEXT_EDITOR_MODEL__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TextEditorModelPackage.TEXT_EDITOR_MODEL__EDITED_OBJECT:
+ if (resolve) return getEditedObject();
+ return basicGetEditedObject();
+ case TextEditorModelPackage.TEXT_EDITOR_MODEL__TYPE:
+ return getType();
+ case TextEditorModelPackage.TEXT_EDITOR_MODEL__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TextEditorModelPackage.TEXT_EDITOR_MODEL__EDITED_OBJECT:
+ setEditedObject((EObject)newValue);
+ return;
+ case TextEditorModelPackage.TEXT_EDITOR_MODEL__TYPE:
+ setType((String)newValue);
+ return;
+ case TextEditorModelPackage.TEXT_EDITOR_MODEL__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TextEditorModelPackage.TEXT_EDITOR_MODEL__EDITED_OBJECT:
+ setEditedObject((EObject)null);
+ return;
+ case TextEditorModelPackage.TEXT_EDITOR_MODEL__TYPE:
+ setType(TYPE_EDEFAULT);
+ return;
+ case TextEditorModelPackage.TEXT_EDITOR_MODEL__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TextEditorModelPackage.TEXT_EDITOR_MODEL__EDITED_OBJECT:
+ return editedObject != null;
+ case TextEditorModelPackage.TEXT_EDITOR_MODEL__TYPE:
+ return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
+ case TextEditorModelPackage.TEXT_EDITOR_MODEL__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ 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(" (type: ");
+ result.append(type);
+ result.append(", name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //TextEditorModelImpl
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/impl/PapyrustextinstancePackageImpl.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/impl/TextEditorModelPackageImpl.java
index 882308903d0..c1677284644 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/impl/PapyrustextinstancePackageImpl.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/impl/TextEditorModelPackageImpl.java
@@ -1,216 +1,218 @@
-/**
- * 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.text.instance.papyrustextinstance.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.EcorePackage;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrusTextInstance;
-import org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrustextinstanceFactory;
-import org.eclipse.papyrus.text.instance.papyrustextinstance.PapyrustextinstancePackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class PapyrustextinstancePackageImpl extends EPackageImpl implements PapyrustextinstancePackage {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass papyrusTextInstanceEClass = 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.text.instance.papyrustextinstance.PapyrustextinstancePackage#eNS_URI
- * @see #init()
- * @generated
- */
- private PapyrustextinstancePackageImpl() {
- super(eNS_URI, PapyrustextinstanceFactory.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 PapyrustextinstancePackage#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 PapyrustextinstancePackage init() {
- if (isInited) return (PapyrustextinstancePackage)EPackage.Registry.INSTANCE.getEPackage(PapyrustextinstancePackage.eNS_URI);
-
- // Obtain or create and register package
- PapyrustextinstancePackageImpl thePapyrustextinstancePackage = (PapyrustextinstancePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PapyrustextinstancePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PapyrustextinstancePackageImpl());
-
- isInited = true;
-
- // Initialize simple dependencies
- EcorePackage.eINSTANCE.eClass();
-
- // Create package meta-data objects
- thePapyrustextinstancePackage.createPackageContents();
-
- // Initialize created meta-data
- thePapyrustextinstancePackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- thePapyrustextinstancePackage.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(PapyrustextinstancePackage.eNS_URI, thePapyrustextinstancePackage);
- return thePapyrustextinstancePackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getPapyrusTextInstance() {
- return papyrusTextInstanceEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getPapyrusTextInstance_EditedObject() {
- return (EReference)papyrusTextInstanceEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getPapyrusTextInstance_Type() {
- return (EAttribute)papyrusTextInstanceEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getPapyrusTextInstance_Name() {
- return (EAttribute)papyrusTextInstanceEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PapyrustextinstanceFactory getPapyrustextinstanceFactory() {
- return (PapyrustextinstanceFactory)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
- papyrusTextInstanceEClass = createEClass(PAPYRUS_TEXT_INSTANCE);
- createEReference(papyrusTextInstanceEClass, PAPYRUS_TEXT_INSTANCE__EDITED_OBJECT);
- createEAttribute(papyrusTextInstanceEClass, PAPYRUS_TEXT_INSTANCE__TYPE);
- createEAttribute(papyrusTextInstanceEClass, PAPYRUS_TEXT_INSTANCE__NAME);
- }
-
- /**
- * <!-- 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);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
- papyrusTextInstanceEClass.getESuperTypes().add(theEcorePackage.getEModelElement());
-
- // Initialize classes and features; add operations and parameters
- initEClass(papyrusTextInstanceEClass, PapyrusTextInstance.class, "PapyrusTextInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getPapyrusTextInstance_EditedObject(), theEcorePackage.getEObject(), null, "editedObject", null, 0, 1, PapyrusTextInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getPapyrusTextInstance_Type(), ecorePackage.getEString(), "type", null, 0, 1, PapyrusTextInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getPapyrusTextInstance_Name(), ecorePackage.getEString(), "name", null, 0, 1, PapyrusTextInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Create resource
- createResource(eNS_URI);
- }
-
-} //PapyrustextinstancePackageImpl
+/**
+ * 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.texteditor.model.texteditormodel.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.EcorePackage;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel;
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModelFactory;
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModelPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TextEditorModelPackageImpl extends EPackageImpl implements TextEditorModelPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass textEditorModelEClass = 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.texteditor.model.texteditormodel.TextEditorModelPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private TextEditorModelPackageImpl() {
+ super(eNS_URI, TextEditorModelFactory.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 TextEditorModelPackage#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 TextEditorModelPackage init() {
+ if (isInited) return (TextEditorModelPackage)EPackage.Registry.INSTANCE.getEPackage(TextEditorModelPackage.eNS_URI);
+
+ // Obtain or create and register package
+ TextEditorModelPackageImpl theTextEditorModelPackage = (TextEditorModelPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof TextEditorModelPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new TextEditorModelPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ EcorePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theTextEditorModelPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theTextEditorModelPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theTextEditorModelPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(TextEditorModelPackage.eNS_URI, theTextEditorModelPackage);
+ return theTextEditorModelPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTextEditorModel() {
+ return textEditorModelEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTextEditorModel_EditedObject() {
+ return (EReference)textEditorModelEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTextEditorModel_Type() {
+ return (EAttribute)textEditorModelEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTextEditorModel_Name() {
+ return (EAttribute)textEditorModelEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TextEditorModelFactory getTextEditorModelFactory() {
+ return (TextEditorModelFactory)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
+ textEditorModelEClass = createEClass(TEXT_EDITOR_MODEL);
+ createEReference(textEditorModelEClass, TEXT_EDITOR_MODEL__EDITED_OBJECT);
+ createEAttribute(textEditorModelEClass, TEXT_EDITOR_MODEL__TYPE);
+ createEAttribute(textEditorModelEClass, TEXT_EDITOR_MODEL__NAME);
+ }
+
+ /**
+ * <!-- 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);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ textEditorModelEClass.getESuperTypes().add(theEcorePackage.getEModelElement());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(textEditorModelEClass, TextEditorModel.class, "TextEditorModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getTextEditorModel_EditedObject(), theEcorePackage.getEObject(), null, "editedObject", null, 0, 1, TextEditorModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getTextEditorModel_Type(), ecorePackage.getEString(), "type", null, 0, 1, TextEditorModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getTextEditorModel_Name(), ecorePackage.getEString(), "name", null, 0, 1, TextEditorModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //TextEditorModelPackageImpl
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/util/PapyrustextinstanceAdapterFactory.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/util/TextEditorModelAdapterFactory.java
index 2b29082442b..48767796458 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/util/PapyrustextinstanceAdapterFactory.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/util/TextEditorModelAdapterFactory.java
@@ -1,146 +1,149 @@
-/**
- * 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.text.instance.papyrustextinstance.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.text.instance.papyrustextinstance.*;
-
-/**
- * <!-- 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.text.instance.papyrustextinstance.PapyrustextinstancePackage
- * @generated
- */
-public class PapyrustextinstanceAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static PapyrustextinstancePackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PapyrustextinstanceAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = PapyrustextinstancePackage.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 PapyrustextinstanceSwitch<Adapter> modelSwitch =
- new PapyrustextinstanceSwitch<Adapter>() {
- @Override
- public Adapter casePapyrusTextInstance(PapyrusTextInstance object) {
- return createPapyrusTextInstanceAdapter();
- }
- @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.text.instance.papyrustextinstance.PapyrusTextInstance <em>Papyrus Text Instance</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.text.instance.papyrustextinstance.PapyrusTextInstance
- * @generated
- */
- public Adapter createPapyrusTextInstanceAdapter() {
- 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;
- }
-
-} //PapyrustextinstanceAdapterFactory
+/**
+ * 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.texteditor.model.texteditormodel.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.texteditor.model.texteditormodel.*;
+
+/**
+ * <!-- 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.texteditor.model.texteditormodel.TextEditorModelPackage
+ * @generated
+ */
+public class TextEditorModelAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static TextEditorModelPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TextEditorModelAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = TextEditorModelPackage.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 TextEditorModelSwitch<Adapter> modelSwitch =
+ new TextEditorModelSwitch<Adapter>() {
+ @Override
+ public Adapter caseTextEditorModel(TextEditorModel object) {
+ return createTextEditorModelAdapter();
+ }
+ @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.texteditor.model.texteditormodel.TextEditorModel <em>Text Editor Model</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.texteditor.model.texteditormodel.TextEditorModel
+ * @generated
+ */
+ public Adapter createTextEditorModelAdapter() {
+ 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;
+ }
+
+} //TextEditorModelAdapterFactory
diff --git a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/util/PapyrustextinstanceSwitch.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/util/TextEditorModelSwitch.java
index 795162a9945..d97583b6a21 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/src/org/eclipse/papyrus/text/instance/papyrustextinstance/util/PapyrustextinstanceSwitch.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.model/src/org/eclipse/papyrus/texteditor/model/texteditormodel/util/TextEditorModelSwitch.java
@@ -1,135 +1,137 @@
-/**
- * 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.text.instance.papyrustextinstance.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.text.instance.papyrustextinstance.*;
-
-/**
- * <!-- 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.text.instance.papyrustextinstance.PapyrustextinstancePackage
- * @generated
- */
-public class PapyrustextinstanceSwitch<T> extends Switch<T> {
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static PapyrustextinstancePackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PapyrustextinstanceSwitch() {
- if (modelPackage == null) {
- modelPackage = PapyrustextinstancePackage.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 PapyrustextinstancePackage.PAPYRUS_TEXT_INSTANCE: {
- PapyrusTextInstance papyrusTextInstance = (PapyrusTextInstance)theEObject;
- T result = casePapyrusTextInstance(papyrusTextInstance);
- if (result == null) result = caseEModelElement(papyrusTextInstance);
- 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 Text Instance</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 Text Instance</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T casePapyrusTextInstance(PapyrusTextInstance 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;
- }
-
-} //PapyrustextinstanceSwitch
+/**
+ * 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.texteditor.model.texteditormodel.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.texteditor.model.texteditormodel.*;
+
+/**
+ * <!-- 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.texteditor.model.texteditormodel.TextEditorModelPackage
+ * @generated
+ */
+public class TextEditorModelSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static TextEditorModelPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TextEditorModelSwitch() {
+ if (modelPackage == null) {
+ modelPackage = TextEditorModelPackage.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 TextEditorModelPackage.TEXT_EDITOR_MODEL: {
+ TextEditorModel textEditorModel = (TextEditorModel)theEObject;
+ T result = caseTextEditorModel(textEditorModel);
+ if (result == null) result = caseEModelElement(textEditorModel);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Text Editor Model</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>Text Editor Model</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTextEditorModel(TextEditorModel 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;
+ }
+
+} //TextEditorModelSwitch
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/.classpath b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/.classpath
new file mode 100644
index 00000000000..64c5e31b7a2
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.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/extraplugins/codegen/org.eclipse.papyrus.text.instance/.project b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/.project
index 3f095dd4ae7..81eff2e0ed5 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.text.instance/.project
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/.project
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.text.instance</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>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.texteditor.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/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/.settings/org.eclipse.jdt.core.prefs b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..af0f20f97a5
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.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/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/META-INF/MANIFEST.MF b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..bed1873f413
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/META-INF/MANIFEST.MF
@@ -0,0 +1,27 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.texteditor.modelexplorer;singleton:=true
+Bundle-Version: 0.10.1.qualifier
+Bundle-Activator: org.eclipse.papyrus.texteditor.modelexplorer.Activator
+Bundle-Localization: plugin
+Bundle-Vendor: %pluginProvider
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.emf;bundle-version="2.6.0",
+ org.eclipse.emf.edit;bundle-version="2.9.0",
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="0.10.1",
+ org.eclipse.emf.facet.infra.query.core;bundle-version="0.3.0",
+ com.google.guava;bundle-version="11.0.2",
+ org.eclipse.papyrus.texteditor.model;bundle-version="0.10.1",
+ org.eclipse.emf.facet.widgets.nattable.instance;bundle-version="0.3.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="0.10.1",
+ org.eclipse.core.expressions;bundle-version="3.4.500",
+ org.eclipse.emf.facet.infra.browser.custom.core;bundle-version="0.3.0",
+ org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.3.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.1"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.papyrus.infra.core.editorsfactory
+Export-Package: org.eclipse.papyrus.texteditor.modelexplorer,
+ org.eclipse.papyrus.texteditor.modelexplorer.queries
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/about.html b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/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/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/build.properties b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/build.properties
new file mode 100644
index 00000000000..a42c291785a
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ resources/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = resources/
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/plugin.properties b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/plugin.properties
new file mode 100644
index 00000000000..b8f982c11e9
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/plugin.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.infra.table.modelexplorer
+pluginProvider = Eclipse Modeling Project
+pluginName = Text Editor Customization For Model Explorer (Incubation) \ No newline at end of file
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/plugin.xml b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/plugin.xml
new file mode 100644
index 00000000000..12c6d8330f5
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/plugin.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse version="3.4"?>
+
+<plugin>
+ <extension point="org.eclipse.emf.facet.infra.facet.registration">
+ <facetset file="resources/TextEditorFacet.facetSet"/>
+ </extension>
+ <extension point="org.eclipse.emf.facet.infra.query.registration">
+ <modelqueryset file="resources/TextEditorQuery.querySet"/>
+ </extension>
+ <extension point="org.eclipse.emf.facet.infra.browser.custom.core.registration">
+ <browserCustomization file="resources/TextEditorFacetCustomization.uiCustom" loadByDefault="true"/>
+ </extension>
+ <extension point="org.eclipse.emf.facet.infra.browser.custom.core.registration">
+ <browserCustomization file="resources/TextEditorInstanceCustomization.uiCustom" loadByDefault="true"/>
+ </extension>
+</plugin>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorFacet.facetSet b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorFacet.facetSet
new file mode 100644
index 00000000000..a5efe951188
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorFacet.facetSet
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="ASCII"?>
+<facet: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:facet="http://www.eclipse.org/EmfFacet/infra/facet/0.8.incubation" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" name="TextEditorFacet" nsURI="http://org.eclipse.org/papyrus/modelExplorer/TextEditorFacet" nsPrefix="TextEditorFacet">
+ <eClassifiers xsi:type="facet:Facet" name="FacetTextEditorContainer" abstract="true">
+ <eSuperTypes href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ <eStructuralFeatures xsi:type="facet:FacetReference" name="texteditors" upperBound="-1" volatile="true" unsettable="true">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/Papyrus/Text/0.10.0/texteditormodel#//TextEditorModel"/>
+ <valueQuery xsi:type="query:JavaModelQuery" href="emffacet:/query/TextEditorQuery#GetContainedTextEditors"/>
+ </eStructuralFeatures>
+ <conditionQuery xsi:type="query:JavaModelQuery" href="emffacet:/query/TextEditorQuery#IsTextEditorContainer"/>
+ </eClassifiers>
+ <extendedPackage href="http://www.eclipse.org/uml2/4.0.0/UML#/"/>
+</facet:FacetSet>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorFacetCustomization.uiCustom b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorFacetCustomization.uiCustom
new file mode 100644
index 00000000000..314c0cc1c21
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorFacetCustomization.uiCustom
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ASCII"?>
+<uicustom:MetamodelView xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" xmlns:uicustom="http://www.eclipse.org/EmfFacet/infra/browser/custom/0.8" metamodelURI="http://org.eclipse.org/papyrus/modelExplorer/TextEditorFacet">
+ <types metaclassName="TextEditorFacet.FacetTextEditorContainer">
+ <references referenceName="texteditors">
+ <customizedFeatures>
+ <valueCases>
+ <value xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ <condition xsi:type="query:JavaModelQuery" href="emffacet:/query/TextEditorQuery#IsTextEditorContainer"/>
+ </valueCases>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ <customizedFeatures customizedFeature="collapseLink">
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="true"/>
+ </customizedFeatures>
+ </references>
+ </types>
+</uicustom:MetamodelView>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorInstanceCustomization.uiCustom b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorInstanceCustomization.uiCustom
new file mode 100644
index 00000000000..4821c009cd5
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorInstanceCustomization.uiCustom
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ASCII"?>
+<uicustom:MetamodelView xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" xmlns:uicustom="http://www.eclipse.org/EmfFacet/infra/browser/custom/0.8" metamodelURI="http://www.eclipse.org/Papyrus/Text/0.10.0/texteditormodel">
+ <types metaclassName="texteditormodel.TextEditorModel">
+ <customizedFeatures customizedFeature="icon">
+ <defaultValue xsi:type="uicustom:DerivedFeatureValue">
+ <valueCalculator xsi:type="query:JavaModelQuery" href="emffacet:/query/TextEditorQuery#GetTextEditorIcon"/>
+ </defaultValue>
+ </customizedFeatures>
+ <customizedFeatures customizedFeature="hideMetaclassName">
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="true"/>
+ </customizedFeatures>
+ <customizedFeatures customizedFeature="label">
+ <defaultValue xsi:type="uicustom:DerivedFeatureValue">
+ <valueCalculator xsi:type="query:JavaModelQuery" href="emffacet:/query/TextEditorQuery#GetTextEditorName"/>
+ </defaultValue>
+ </customizedFeatures>
+ <references referenceName="fillingQueries">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ <references referenceName="TextEditor">
+ <customizedFeatures>
+ <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+</uicustom:MetamodelView>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorQuery.querySet b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorQuery.querySet
new file mode 100644
index 00000000000..ac50527650c
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/resources/TextEditorQuery.querySet
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ASCII"?>
+<query:ModelQuerySet 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:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" name="TextEditorQuery">
+ <associatedMetamodels href="http://www.eclipse.org/Papyrus/Text/0.10.0/texteditormodel#/"/>
+ <associatedMetamodels href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ <associatedMetamodels href="http://www.eclipse.org/uml2/4.0.0/UML#/"/>
+ <associatedMetamodels href="http://www.eclipse.org/uml2/4.0.0/Types#/"/>
+ <queries xsi:type="query:JavaModelQuery" name="IsTextEditorContainer" description="Returns true if the element contains a text editor" implementationClassName="org.eclipse.papyrus.texteditor.modelexplorer.queries.IsTextEditorContainer">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="GetContainedTextEditors" description="Get the collection of all contained text editors" upperBound="-1" implementationClassName="org.eclipse.papyrus.texteditor.modelexplorer.queries.GetContainedTextEditors">
+ <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/Papyrus/Text/0.10.0/texteditormodel#//TextEditorModel"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="GetTextEditorIcon" description="Return the path to the icon of the corresponding text editor" implementationClassName="org.eclipse.papyrus.texteditor.modelexplorer.queries.GetTextEditorIcon">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ <scope href="http://www.eclipse.org/Papyrus/Text/0.10.0/texteditormodel#//TextEditorModel"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="GetTextEditorName" description="Return the name for the text editor" implementationClassName="org.eclipse.papyrus.texteditor.modelexplorer.queries.GetTextEditorName">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ <scope href="http://www.eclipse.org/Papyrus/Text/0.10.0/texteditormodel#//TextEditorModel"/>
+ </queries>
+</query:ModelQuerySet>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/Activator.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/Activator.java
new file mode 100644
index 00000000000..db220f76a3f
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * 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.texteditor.modelexplorer;
+
+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.exteditor.cdt.modelexplorer"; //$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)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/GetContainedTextEditors.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/GetContainedTextEditors.java
new file mode 100644
index 00000000000..c27a051bf40
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/GetContainedTextEditors.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr - Initial API and implementation
+ * (with the help of examining table support from Vincent Lorenzo)
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.texteditor.modelexplorer.queries;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
+import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
+import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel;
+import org.eclipse.papyrus.views.modelexplorer.queries.AbstractEditorContainerQuery;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Sets;
+
+/** Get the collection of all contained tables */
+//FIXME this query is declared using Element in the querySet -> change into EObject when the EMF-Facet bug will be corrected 365744
+public class GetContainedTextEditors extends AbstractEditorContainerQuery implements IJavaModelQuery<EObject, Collection<TextEditorModel>> {
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<TextEditorModel> evaluate(final EObject context, final ParameterValueList parameterValues) throws ModelQueryExecutionException {
+ Predicate<EStructuralFeature.Setting> p = new Predicate<EStructuralFeature.Setting>() {
+
+ public boolean apply(EStructuralFeature.Setting setting) {
+ return (setting.getEObject() instanceof TextEditorModel);
+ }
+ };
+
+ Function<EStructuralFeature.Setting, TextEditorModel> f = new Function<EStructuralFeature.Setting, TextEditorModel>() {
+
+ public TextEditorModel apply(EStructuralFeature.Setting setting) {
+ if (setting.getEObject() instanceof TextEditorModel) {
+ return (TextEditorModel) setting.getEObject();
+ }
+ return null;
+ }
+
+ };
+
+ Iterable<TextEditorModel> transform = Iterables.transform(Iterables.filter(EMFHelper.getUsages(context), p), f);
+ transform = Iterables.filter(transform, new Predicate<TextEditorModel>() {
+
+ public boolean apply(TextEditorModel table) {
+ return table != null;
+ }
+ });
+ return Sets.newHashSet(transform);
+ }
+
+}
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/GetTextEditorIcon.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/GetTextEditorIcon.java
new file mode 100644
index 00000000000..b5f64f1c16b
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/GetTextEditorIcon.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr - Initial API and implementation
+ * (with the help of examining table support from Vincent Lorenzo)
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.texteditor.modelexplorer.queries;
+
+import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
+import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
+import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel;
+import org.eclipse.papyrus.views.modelexplorer.queries.AbstractGetEditorIconQuery;
+
+/** Return the path to the icon of the corresponding table */
+public class GetTextEditorIcon extends AbstractGetEditorIconQuery implements IJavaModelQuery<TextEditorModel, String> {
+
+ /**
+ * {@inheritDoc}
+ */
+ public String evaluate(final TextEditorModel textInstance, final ParameterValueList parameterValues) throws ModelQueryExecutionException {
+ return "/" + getEditorRegistry(textInstance).getEditorURLIcon(textInstance); //$NON-NLS-1$
+ }
+}
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/GetTextEditorName.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/GetTextEditorName.java
new file mode 100644
index 00000000000..0dd3b85a086
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/GetTextEditorName.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr - Initial API and implementation
+ * (with the help of examining table support from Vincent Lorenzo)
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.texteditor.modelexplorer.queries;
+
+import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
+import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
+import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel;
+
+/** Return the name for the table */
+public class GetTextEditorName implements IJavaModelQuery<TextEditorModel, String> {
+
+ /**
+ * {@inheritDoc}
+ */
+ public String evaluate(final TextEditorModel context, final ParameterValueList parameterValues) throws ModelQueryExecutionException {
+ return context.getName();
+ }
+}
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/IsTextEditorContainer.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/IsTextEditorContainer.java
new file mode 100644
index 00000000000..cb1c209789b
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/IsTextEditorContainer.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr - Initial API and implementation
+ * (with the help of examining table support from Vincent Lorenzo)
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.texteditor.modelexplorer.queries;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
+import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
+import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel;
+import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModelPackage;
+import org.eclipse.papyrus.views.modelexplorer.NavigatorUtils;
+import org.eclipse.papyrus.views.modelexplorer.queries.AbstractEditorContainerQuery;
+
+import com.google.common.base.Predicate;
+
+/** Returns true if the element contains a Table */
+//FIXME this query is declared using Element in the querySet -> change into EObject when the EMF-Facet bug will be corrected 365744
+public class IsTextEditorContainer extends AbstractEditorContainerQuery implements IJavaModelQuery<EObject, Boolean> {
+
+ /**
+ * {@inheritDoc}
+ */
+ public Boolean evaluate(final EObject context, ParameterValueList parameterValues) throws ModelQueryExecutionException {
+ Predicate<EObject> p = new Predicate<EObject>() {
+
+ public boolean apply(EObject arg0) {
+ if(arg0 instanceof TextEditorModel) {
+ TextEditorModel textEditorInstance = (TextEditorModel)arg0;
+ if (textEditorInstance.getEditedObject() == context) {
+ // System.err.println("isContainer = true: " + context); //$NON-NLS-1$
+ }
+ return (textEditorInstance.getEditedObject() == context);
+ }
+ return false;
+ }
+ };
+
+ return NavigatorUtils.any(context, TextEditorModelPackage.eINSTANCE.getTextEditorModel(), false, p);
+ }
+}

Back to the top