Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2005-08-03 18:19:10 -0400
committeratikhomirov2005-08-03 18:19:10 -0400
commita6c85dc2721e973e223da405442cba0928af4256 (patch)
treed02ea3d2a0e373273428084ec7ea3ce5abec95ae
downloadorg.eclipse.gmf-tooling-a6c85dc2721e973e223da405442cba0928af4256.tar.gz
org.eclipse.gmf-tooling-a6c85dc2721e973e223da405442cba0928af4256.tar.xz
org.eclipse.gmf-tooling-a6c85dc2721e973e223da405442cba0928af4256.zip
*** empty log message ***
-rw-r--r--plugins/org.eclipse.gmf.bridge/.classpath7
-rw-r--r--plugins/org.eclipse.gmf.bridge/.cvsignore1
-rw-r--r--plugins/org.eclipse.gmf.bridge/.project28
-rw-r--r--plugins/org.eclipse.gmf.bridge/META-INF/MANIFEST.MF14
-rw-r--r--plugins/org.eclipse.gmf.bridge/build.properties4
-rw-r--r--plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/BasicDiagramRunTimeModelHelper.java88
-rw-r--r--plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DefaultNamingStrategy.java80
-rw-r--r--plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramGenModelTransformer.java306
-rw-r--r--plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramRunTimeModelHelper.java33
-rw-r--r--plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramRunTimeModelTransformer.java78
-rw-r--r--plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/EditPartNamingStrategy.java35
-rw-r--r--plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/MappingTransofrmer.java40
-rw-r--r--plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/MetaInfoProviderNamingStrategy.java31
-rw-r--r--plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/NamingStrategy.java43
-rw-r--r--plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/SpecificDiagramRunTimeModelHelper.java86
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/.classpath7
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/.cvsignore1
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/.project28
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/META-INF/MANIFEST.MF19
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/build.properties8
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_links_GenLinkReferenceOnly.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_links_GenLinkWithClass.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_nodes_GenChildNode.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_nodes_GenNode.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_palette_Palette.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenNode_childContainers_GenChildContainer.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenNode_childNodes_GenChildNode.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreatePalette_groups_ToolGroup.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateToolGroup_linkTools_LinkEntry.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateToolGroup_nodeTools_NodeEntry.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/DiagramGenMetaModelModelFile.gifbin0 -> 346 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GMFGenModelFile.gifbin0 -> 346 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenChildContainer.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenChildNode.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenDiagram.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenLinkReferenceOnly.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenLinkWithClass.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenNode.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/LinkEntry.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/NodeEntry.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/Palette.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/PaletteGenMetaModelModelFile.gifbin0 -> 346 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/ToolGroup.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/wizban/NewDiagramGenMetaModel.gifbin0 -> 2462 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/wizban/NewGMFGen.gifbin0 -> 2462 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/icons/full/wizban/NewPaletteGenMetaModel.gifbin0 -> 2462 bytes
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/plugin.properties165
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/plugin.xml53
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/EditorPlugin.java98
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenActionBarContributor.java407
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenEditor.java1460
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenModelWizard.java615
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/EntryBaseItemProvider.java230
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java406
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenBaseElementItemProvider.java185
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenChildContainerItemProvider.java264
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenChildNodeItemProvider.java174
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenCommonBaseItemProvider.java209
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenDiagramItemProvider.java565
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenLinkItemProvider.java230
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenLinkReferenceOnlyItemProvider.java122
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenLinkWithClassItemProvider.java166
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenNodeItemProvider.java330
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/LinkEntryItemProvider.java143
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/NodeEntryItemProvider.java143
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/PaletteItemProvider.java245
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ToolEntryItemProvider.java141
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ToolGroupItemProvider.java171
-rw-r--r--plugins/org.eclipse.gmf.codegen/.classpath8
-rw-r--r--plugins/org.eclipse.gmf.codegen/.cvsignore1
-rw-r--r--plugins/org.eclipse.gmf.codegen/.jetproperties4
-rw-r--r--plugins/org.eclipse.gmf.codegen/.project34
-rw-r--r--plugins/org.eclipse.gmf.codegen/META-INF/MANIFEST.MF19
-rw-r--r--plugins/org.eclipse.gmf.codegen/build.properties13
-rw-r--r--plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore283
-rw-r--r--plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel155
-rw-r--r--plugins/org.eclipse.gmf.codegen/plugin.xml13
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/CanvasEditPartGen.java57
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/EditPartFactoryGen.java136
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/EditorGen.java118
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/LinkEditPartGen.java132
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/NodeEditPartGen.java222
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/PaletteGen.java254
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/PluginGen.java49
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/PluginXML.java104
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/CanvasMetaInfoProviderGenerator.java41
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/LinkMetaInfoProviderGenerator.java77
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/MetaInfoProviderAdapterFactory1Generator.java117
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/MetaInfoProviderAdapterFactory2Generator.java97
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/NodeMetaInfoProviderGenerator.java75
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/CompartmentLayoutKind.java216
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/CompartmentPlacementKind.java135
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/EntryBase.java162
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenFactory.java127
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenPackage.java2811
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenBaseElement.java121
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenChildContainer.java199
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenChildNode.java98
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenCommonBase.java191
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenDiagram.java622
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenLink.java177
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenLinkReferenceOnly.java34
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenLinkWithClass.java93
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenNode.java278
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/LinkEntry.java71
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/NodeEntry.java71
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/Palette.java182
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/ToolEntry.java54
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/ToolGroup.java83
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/EntryBaseImpl.java375
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenFactoryImpl.java250
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java1466
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenBaseElementImpl.java332
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenChildContainerImpl.java430
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenChildNodeImpl.java491
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenCommonBaseImpl.java400
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenDiagramImpl.java1443
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenLinkImpl.java529
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenLinkReferenceOnlyImpl.java291
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenLinkWithClassImpl.java416
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GenNodeImpl.java719
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/LinkEntryImpl.java285
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/NodeEntryImpl.java285
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/PaletteImpl.java455
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/ToolEntryImpl.java208
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/ToolGroupImpl.java295
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/util/GMFGenAdapterFactory.java370
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/util/GMFGenSwitch.java459
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/util/EmitterFactory.java126
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/util/Generator.java477
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/util/ImportUtil.java68
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/util/Messages.java23
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/util/UnexpectedBehaviourException.java13
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/util/messages.properties4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/edit/CanvasMetaInfoProvider.javajet15
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/edit/LinkMetaInfoProvider.javajet46
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/edit/MetaInfoProviderAdapterFactory1.javajet134
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/edit/MetaInfoProviderAdapterFactory2.javajet100
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/edit/NodeMetaInfoProvider.javajet48
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/editor/Editor.javajet321
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/editor/Palette.javajet134
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/editor/Plugin.javajet49
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/editor/commontools.jetinc9
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/editor/linktool.jetinc33
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/editor/nodetool.jetinc31
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/editor/plugin.xmljet83
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/emf-merge.xml171
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/CanvasEditPart.javajet155
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/EditPartFactory.javajet97
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/LinkEditPart.javajet256
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/NodeEditPart.javajet474
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/childnodeepfactory.jetinc24
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/directedit.jetinc101
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/linkepfactory.jetinc3
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/nodeepfactory.jetinc3
155 files changed, 27690 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.bridge/.classpath b/plugins/org.eclipse.gmf.bridge/.classpath
new file mode 100644
index 000000000..751c8f2e5
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.gmf.bridge/.cvsignore b/plugins/org.eclipse.gmf.bridge/.cvsignore
new file mode 100644
index 000000000..ba077a403
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/plugins/org.eclipse.gmf.bridge/.project b/plugins/org.eclipse.gmf.bridge/.project
new file mode 100644
index 000000000..fd8d113b4
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.gmf.bridge</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/plugins/org.eclipse.gmf.bridge/META-INF/MANIFEST.MF b/plugins/org.eclipse.gmf.bridge/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..3338247bd
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: GMF Models Bridging Plug-in
+Bundle-SymbolicName: org.eclipse.gmf.bridge
+Bundle-Version: 1.0.0
+Bundle-Vendor: Eclipse.org
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.jdt.core,
+ org.eclipse.gmf.diadef;visibility:=reexport,
+ org.eclipse.gmf.map;visibility:=reexport,
+ org.eclipse.gmf.codegen;visibility:=reexport,
+ org.eclipse.gmf.runtime
+Export-Package: org.eclipse.gmf.bridge.genmodel
diff --git a/plugins/org.eclipse.gmf.bridge/build.properties b/plugins/org.eclipse.gmf.bridge/build.properties
new file mode 100644
index 000000000..34d2e4d2d
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/BasicDiagramRunTimeModelHelper.java b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/BasicDiagramRunTimeModelHelper.java
new file mode 100644
index 000000000..6769a331e
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/BasicDiagramRunTimeModelHelper.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.bridge.genmodel;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
+import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.gmf.diagramrt.DiagramRTPackage;
+import org.eclipse.gmf.mappings.CanvasMapping;
+import org.eclipse.gmf.mappings.ChildNodeMapping;
+import org.eclipse.gmf.mappings.LinkMapping;
+import org.eclipse.gmf.mappings.NodeMapping;
+
+/**
+ * Makes use of basic/standard classes for runtime presentation of diagram
+ * @author artem
+ */
+public class BasicDiagramRunTimeModelHelper implements DiagramRunTimeModelHelper {
+ private static final String DIAGRAM_RT_URI = "http://www.eclipse.org/gmf/2005/diagramrt";
+ private GenClass myNode;
+ private GenClass myLink;
+ private GenClass myCanvas;
+ private GenClass myChildNode;
+ private boolean myIsLoaded = false;
+
+ public BasicDiagramRunTimeModelHelper() {
+ }
+
+ public GenClass get(NodeMapping nodeMapping) {
+ loadGenModel();
+ return myNode;
+ }
+
+ public GenClass get(LinkMapping linkMapping) {
+ loadGenModel();
+ return myLink;
+ }
+
+ public GenClass get(CanvasMapping canvasMapping) {
+ loadGenModel();
+ return myCanvas;
+ }
+
+ public GenClass get(ChildNodeMapping childNodeMapping) {
+ loadGenModel();
+ return myChildNode;
+ }
+
+ private void loadGenModel() {
+ if (myIsLoaded ) {
+ return;
+ }
+ myIsLoaded = true;
+ URI diagramRTGenModelURI = (URI) EcorePlugin.getEPackageNsURIToGenModelLocationMap().get(DIAGRAM_RT_URI);
+ Resource r = new ResourceSetImpl().getResource(diagramRTGenModelURI, true);
+ GenModel drtModel = (GenModel) r.getContents().get(0);
+ GenPackage gp = drtModel.findGenPackage(DiagramRTPackage.eINSTANCE);
+ for (Iterator it = gp.getGenClasses().iterator(); it.hasNext();) {
+ GenClass next = (GenClass) it.next();
+ if (DiagramRTPackage.eINSTANCE.getDiagramNode().getName().equals(next.getName())) {
+ myNode = next;
+ } else if (DiagramRTPackage.eINSTANCE.getDiagramLink().getName().equals(next.getName())) {
+ myLink = next;
+ } else if (DiagramRTPackage.eINSTANCE.getDiagramCanvas().getName().equals(next.getName())) {
+ myCanvas = next;
+ } else if (DiagramRTPackage.eINSTANCE.getChildNode().getName().equals(next.getName())) {
+ myChildNode = next;
+ }
+ }
+ r.unload();
+ assert myNode != null && myLink != null && myCanvas != null;
+ }
+}
diff --git a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DefaultNamingStrategy.java b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DefaultNamingStrategy.java
new file mode 100644
index 000000000..26e363f85
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DefaultNamingStrategy.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.bridge.genmodel;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.gmf.mappings.CanvasMapping;
+import org.eclipse.gmf.mappings.ChildNodeMapping;
+import org.eclipse.gmf.mappings.LinkMapping;
+import org.eclipse.gmf.mappings.NodeMapping;
+import org.eclipse.jdt.core.JavaConventions;
+
+/**
+ * In most cases it should be sufficient to override <code>getXXXSuffix()</code>
+ * methods to get nice and valid class names.
+ * FIXME track names and do not allow duplicates?
+ * @author artem
+ */
+public class DefaultNamingStrategy extends NamingStrategy {
+
+ public String createClassName(CanvasMapping mapping) {
+ return translateNameToJavaIdentifier(mapping.getDiagramCanvas().getName() + getCanvasSuffix());
+ }
+
+ public String createClassName(NodeMapping nme) {
+ return translateNameToJavaIdentifier(nme.getDiagramNode().getName() + getNodeSuffix());
+ }
+
+ public String createClassName(ChildNodeMapping chnme) {
+ return translateNameToJavaIdentifier(chnme.getDiagramNode().getName() + getChildNodeSuffix());
+ }
+
+ public String createClassName(LinkMapping lme) {
+ return translateNameToJavaIdentifier(lme.getDiagramLink().getName() + getLinkSuffix());
+ }
+
+ protected String getLinkSuffix() {
+ return "";
+ }
+
+ protected String getNodeSuffix() {
+ return "";
+ }
+
+ protected String getCanvasSuffix() {
+ return "";
+ }
+
+ protected String getChildNodeSuffix() {
+ return "";
+ }
+
+ protected String translateNameToJavaIdentifier(String name) {
+ name = name.trim();
+ IStatus s = JavaConventions.validateJavaTypeName(name);
+ if (s.getSeverity() != IStatus.ERROR) {
+ return name;
+ }
+ StringBuilder sb = new StringBuilder(name.length());
+ if (!Character.isJavaIdentifierStart(name.charAt(0)) && Character.isJavaIdentifierPart(name.charAt(0))) {
+ sb.append('_');
+ }
+ for (int i = 0; i < name.length(); i++) {
+ if (Character.isJavaIdentifierPart(name.charAt(i))) {
+ sb.append(name.charAt(i));
+ } else {
+ sb.append('_');
+ }
+ }
+ return sb.toString();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramGenModelTransformer.java b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramGenModelTransformer.java
new file mode 100644
index 000000000..1bc6fbbe5
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramGenModelTransformer.java
@@ -0,0 +1,306 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.bridge.genmodel;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.codegen.gmfgen.CompartmentLayoutKind;
+import org.eclipse.gmf.codegen.gmfgen.GMFGenFactory;
+import org.eclipse.gmf.codegen.gmfgen.GenChildContainer;
+import org.eclipse.gmf.codegen.gmfgen.GenChildNode;
+import org.eclipse.gmf.codegen.gmfgen.GenDiagram;
+import org.eclipse.gmf.codegen.gmfgen.GenLink;
+import org.eclipse.gmf.codegen.gmfgen.GenLinkReferenceOnly;
+import org.eclipse.gmf.codegen.gmfgen.GenLinkWithClass;
+import org.eclipse.gmf.codegen.gmfgen.GenNode;
+import org.eclipse.gmf.codegen.gmfgen.LinkEntry;
+import org.eclipse.gmf.codegen.gmfgen.NodeEntry;
+import org.eclipse.gmf.codegen.gmfgen.Palette;
+import org.eclipse.gmf.codegen.gmfgen.ToolEntry;
+import org.eclipse.gmf.codegen.gmfgen.ToolGroup;
+import org.eclipse.gmf.diadef.AdornmentKind;
+import org.eclipse.gmf.diadef.Compartment;
+import org.eclipse.gmf.diadef.DiagramElement;
+import org.eclipse.gmf.diadef.LineKind;
+import org.eclipse.gmf.diadef.Node;
+import org.eclipse.gmf.mappings.CanvasMapping;
+import org.eclipse.gmf.mappings.ChildNodeMapping;
+import org.eclipse.gmf.mappings.LinkMapping;
+import org.eclipse.gmf.mappings.NodeMapping;
+
+/**
+ * Creates generation model from diagram definition.
+ * @author artem
+ */
+public class DiagramGenModelTransformer extends MappingTransofrmer {
+ private static final int CANVAS_COUNT_BASE = 79;
+ private static final int NODE_COUNT_BASE = 100;
+ private static final int CHILD_COUNT_BASE = 200;
+ private static final int LINK_COUNT_BASE = 300;
+
+ private GenDiagram myGenModel;
+ private final DiagramRunTimeModelHelper myDRTHelper;
+ private final NamingStrategy myEditPartNamingStrategy;
+ private final NamingStrategy myMetaInfoNamingStrategy;
+ private int myNodeCount = 0;
+ private int myLinkCount = 0;
+ private int myChildCount = 0;
+
+ public DiagramGenModelTransformer(DiagramRunTimeModelHelper drtHelper, NamingStrategy editPartNaming, NamingStrategy metaInfoNaming) {
+ myDRTHelper = drtHelper;
+ myEditPartNamingStrategy = editPartNaming;
+ myMetaInfoNamingStrategy = metaInfoNaming;
+ }
+
+ public GenDiagram getResult() {
+ return getGenDiagram();
+ }
+
+ private GenDiagram getGenDiagram() {
+ if (myGenModel == null) {
+ myGenModel = GMFGenFactory.eINSTANCE.createGenDiagram();
+ }
+ return myGenModel;
+ }
+
+ private Palette getGenPalette() {
+ Palette p = getGenDiagram().getPalette();
+ if (p == null) {
+ p = GMFGenFactory.eINSTANCE.createPalette();
+ getGenDiagram().setPalette(p);
+ }
+ return p;
+ }
+
+ protected void process(CanvasMapping mapping) {
+ assert mapping.getDomainModel() != null;
+ getGenDiagram().setDomainMetaModel(mapping.getDomainModel());
+ getGenDiagram().setDomainDiagramElement(mapping.getDomainMetaElement());
+ getGenDiagram().setEditPartClassName(createEditPartClassName(mapping));
+ getGenDiagram().setMetaInfoProviderClassName(createMetaInfoProviderClassName(mapping));
+ getGenDiagram().setDiagramRunTimeClass(findRunTimeClass(mapping));
+ getGenDiagram().setVisualID(CANVAS_COUNT_BASE);
+ getGenDiagram().setPluginName(mapping.getDomainModel().getName() + " Plugin");
+ }
+
+ protected void process(NodeMapping nme) {
+ assert nme.getDomainMetaElement() != null;
+ assert nme.getDiagramNode() != null;
+ assert checkDirectEditAttrValidity(nme);
+ GenNode genNode = GMFGenFactory.eINSTANCE.createGenNode();
+ getGenDiagram().getNodes().add(genNode);
+ genNode.setDiagramRunTimeClass(findRunTimeClass(nme));
+ genNode.setDomainMetaClass(nme.getDomainMetaElement());
+ genNode.setContainmentMetaFeature(nme.getContainmentFeature());
+ genNode.setVisualID(NODE_COUNT_BASE + (++myNodeCount));
+ if (getGenDiagram().getDomainMetaModel() != null) {
+ assert getGenDiagram().getDomainMetaModel() == nme.getDomainMetaElement().getEPackage();
+ }
+ if (nme.getEditFeature() != null) {
+ genNode.setDomainNameFeature(nme.getEditFeature());
+ }
+ genNode.setEditPartClassName(createEditPartClassName(nme));
+ genNode.setMetaInfoProviderClassName(createMetaInfoProviderClassName(nme));
+ handleToolDef(nme.getDiagramNode(), genNode);
+ for (Iterator it = nme.getDiagramNode().getCompartments().iterator(); it.hasNext();) {
+ Compartment compartment = (Compartment) it.next();
+ GenChildContainer childContainer = GMFGenFactory.eINSTANCE.createGenChildContainer();
+ childContainer.setGroupID(compartment.getName());
+ childContainer.setCanCollapse(compartment.isCollapsible());
+ childContainer.setNeedsTitle(compartment.isNeedsTitle());
+ childContainer.setLayoutKind(CompartmentLayoutKind.TOOLBAR_LITERAL);
+ childContainer.setTitleKey(compartment.getName());
+ genNode.getChildContainers().add(childContainer);
+ }
+
+ for (Iterator it = nme.getChildMappings().iterator(); it.hasNext();) {
+ ChildNodeMapping childNodeMapping = (ChildNodeMapping) it.next();
+ GenChildNode childNode = GMFGenFactory.eINSTANCE.createGenChildNode();
+ assert childNodeMapping.getDomainChildrenFeature() instanceof EReference;
+ assert childNodeMapping.getDomainChildrenFeature().getEType() instanceof EClass;
+ childNode.setContainmentMetaFeature((EReference) childNodeMapping.getDomainChildrenFeature());
+ childNode.setDomainMetaClass((EClass) childNodeMapping.getDomainChildrenFeature().getEType());
+ childNode.setDiagramRunTimeClass(findRunTimeClass(childNodeMapping));
+ childNode.setEditPartClassName(createEditPartClassName(childNodeMapping));
+ childNode.setMetaInfoProviderClassName(createMetaInfoProviderClassName(childNodeMapping));
+ childNode.setGroupID(childNodeMapping.getCompartment().getName());
+ childNode.setVisualID(CHILD_COUNT_BASE + (++myChildCount ));
+ genNode.getChildNodes().add(childNode);
+ handleToolDef(childNodeMapping.getDiagramNode(), childNode);
+ }
+ }
+
+ private void handleToolDef(Node nodeToolDef, GenNode genNode) {
+ if (nodeToolDef.isNeedsTool()) {
+ NodeEntry ne = GMFGenFactory.eINSTANCE.createNodeEntry();
+ findToolGroup(nodeToolDef.getToolGroupID()).getNodeTools().add(ne);
+ ne.setGenNode(genNode);
+ setupCommonToolEntry(ne, nodeToolDef);
+ }
+ }
+
+ protected void process(LinkMapping lme) {
+ assert lme.getDiagramLink() != null;
+ assert lme.getLinkMetaFeature() != null;
+ GenLink gl;
+ if (lme.getDomainMetaElement() != null) {
+ GenLinkWithClass genLink = GMFGenFactory.eINSTANCE.createGenLinkWithClass();
+ getGenDiagram().getLinks().add(genLink);
+ genLink.setDomainMetaClass(lme.getDomainMetaElement());
+ genLink.setDomainLinkTargetFeature(lme.getLinkMetaFeature());
+ gl = genLink;
+ } else {
+ GenLinkReferenceOnly genLink = GMFGenFactory.eINSTANCE.createGenLinkReferenceOnly();
+ getGenDiagram().getLinks().add(genLink);
+ genLink.setDomainLinkTargetFeature(lme.getLinkMetaFeature());
+ gl = genLink;
+ }
+ if (lme.getDiagramLink().isNeedsTool()) {
+ LinkEntry le = GMFGenFactory.eINSTANCE.createLinkEntry();
+ findToolGroup(lme.getDiagramLink().getToolGroupID()).getLinkTools().add(le);
+ le.setGenLink(gl);
+ setupCommonToolEntry(le, lme.getDiagramLink());
+ }
+ gl.setDomainNameFeature(lme.getLabelEditFeature());
+ gl.setDiagramRunTimeClass(findRunTimeClass(lme));
+ gl.setEditPartClassName(createEditPartClassName(lme));
+ gl.setMetaInfoProviderClassName(createMetaInfoProviderClassName(lme));
+ gl.setContainmentMetaFeature(lme.getContainmentFeature());
+ gl.setVisualID(LINK_COUNT_BASE + (++myLinkCount));
+ LineKind lineKind = lme.getDiagramLink().getLineKind();
+ if (lineKind != null) {
+ switch (lineKind.getValue()) {
+ case LineKind.SOLID : gl.setLineStyle("LINE_SOLID"); break;
+ case LineKind.DOT : gl.setLineStyle("LINE_DOT"); break;
+ case LineKind.DASH : gl.setLineStyle("LINE_DASH"); break;
+ }
+ }
+ String decorationFigure = figureClassFromAdornment(lme.getDiagramLink().getSourceAdornment());
+ if (decorationFigure != null) {
+ gl.setSourceDecorationFigureQualifiedClassName(decorationFigure);
+ }
+ decorationFigure = figureClassFromAdornment(lme.getDiagramLink().getTargetAdornment());
+ if (decorationFigure != null) {
+ gl.setTargetDecorationFigureQualifiedClassName(decorationFigure);
+ }
+ }
+
+ //
+
+ private String createEditPartClassName(NodeMapping nme) {
+ return myEditPartNamingStrategy.createClassName(nme);
+ }
+
+ private String createEditPartClassName(LinkMapping lme) {
+ return myEditPartNamingStrategy.createClassName(lme);
+ }
+
+ private String createEditPartClassName(CanvasMapping mapping) {
+ return myEditPartNamingStrategy.createClassName(mapping);
+ }
+
+ private String createEditPartClassName(ChildNodeMapping chnme) {
+ return myEditPartNamingStrategy.createClassName(chnme);
+ }
+
+ //
+
+ private String createMetaInfoProviderClassName(NodeMapping nme) {
+ return myMetaInfoNamingStrategy.createClassName(nme);
+ }
+
+ private String createMetaInfoProviderClassName(LinkMapping lme) {
+ return myMetaInfoNamingStrategy.createClassName(lme);
+ }
+
+ private String createMetaInfoProviderClassName(CanvasMapping mapping) {
+ return myMetaInfoNamingStrategy.createClassName(mapping);
+ }
+
+ private String createMetaInfoProviderClassName(ChildNodeMapping chnme) {
+ return myMetaInfoNamingStrategy.createClassName(chnme);
+ }
+
+ //
+
+ private GenClass findRunTimeClass(NodeMapping nme) {
+ return myDRTHelper.get(nme);
+ }
+
+ private GenClass findRunTimeClass(ChildNodeMapping childNodeMapping) {
+ return myDRTHelper.get(childNodeMapping);
+ }
+
+ private GenClass findRunTimeClass(LinkMapping lme) {
+ return myDRTHelper.get(lme);
+ }
+
+ private GenClass findRunTimeClass(CanvasMapping mapping) {
+ return myDRTHelper.get(mapping);
+ }
+
+ private String figureClassFromAdornment(AdornmentKind adornment) {
+ if (adornment == null) {
+ return null;
+ }
+ switch (adornment.getValue()) {
+ case AdornmentKind.OPEN_TRIANGLE : return "org.eclipse.draw2d.PolylineDecoration";
+ case AdornmentKind.FILLED_TRIANGLE : return "org.eclipse.draw2d.PolygonDecoration";
+ case AdornmentKind.RHOMB : return "org.eclipse.gmf.draw2d.RhombDecoration";
+ case AdornmentKind.FILLED_RHOMB : return "org.eclipse.gmf.draw2d.FilledRhombDecoration";
+ }
+ return null;
+ }
+
+ private void setupCommonToolEntry(ToolEntry te, DiagramElement diagramElement) {
+ final String elementName = diagramElement.getName();
+ if (diagramElement.getLargeIconPath() == null) {
+ te.setLargeIconPath("icons/large/" + elementName + ".gif");
+ } else {
+ te.setLargeIconPath(diagramElement.getLargeIconPath());
+ }
+ if (diagramElement.getSmallIconPath() == null) {
+ // XXX never gets here as long the same code is inside DiagramElementImpl.getSmallIconPath()
+ te.setSmallIconPath("icons/small/" + elementName + ".gif");
+ } else {
+ te.setSmallIconPath(diagramElement.getSmallIconPath());
+ }
+ te.setTitleKey(elementName);
+ te.setDescriptionKey(elementName);
+ }
+
+ private ToolGroup findToolGroup(String id) {
+ id = id == null ? "" : id;
+ for (Iterator it = getGenPalette().getGroups().iterator(); it.hasNext();) {
+ ToolGroup next = (ToolGroup) it.next();
+ if (id.equals(next.getTitleKey())) {
+ return next;
+ }
+ }
+ ToolGroup tg = GMFGenFactory.eINSTANCE.createToolGroup();
+ getGenPalette().getGroups().add(tg);
+ tg.setTitleKey(id);
+ return tg;
+ }
+
+ private boolean checkDirectEditAttrValidity(NodeMapping nme) {
+ if (nme.getEditFeature() == null) {
+ return true;
+ }
+ EClassifier attrContainer = nme.getEditFeature().getEContainingClass();
+ return attrContainer == nme.getDomainMetaElement() || nme.getDomainMetaElement().getEAllSuperTypes().contains(attrContainer);
+ }
+}
diff --git a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramRunTimeModelHelper.java b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramRunTimeModelHelper.java
new file mode 100644
index 000000000..2398ce6ce
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramRunTimeModelHelper.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.bridge.genmodel;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.gmf.mappings.CanvasMapping;
+import org.eclipse.gmf.mappings.ChildNodeMapping;
+import org.eclipse.gmf.mappings.LinkMapping;
+import org.eclipse.gmf.mappings.NodeMapping;
+
+/**
+ * Bridges diagram definition elements with classes that represent diagram at runtime.
+ * @author artem
+ */
+public interface DiagramRunTimeModelHelper {
+
+ public GenClass get(NodeMapping nodeMapping);
+
+ public GenClass get(ChildNodeMapping childNodeMapping);
+
+ public GenClass get(LinkMapping linkMapping);
+
+ public GenClass get(CanvasMapping canvasMapping);
+}
diff --git a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramRunTimeModelTransformer.java b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramRunTimeModelTransformer.java
new file mode 100644
index 000000000..e292acd18
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/DiagramRunTimeModelTransformer.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.bridge.genmodel;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.gmf.diadef.CommonBase;
+import org.eclipse.gmf.diadef.RunTimeProperty;
+import org.eclipse.gmf.diagramrt.DiagramRTPackage;
+import org.eclipse.gmf.mappings.CanvasMapping;
+import org.eclipse.gmf.mappings.LinkMapping;
+import org.eclipse.gmf.mappings.NodeMapping;
+
+/**
+ * Creates bare extended version of basic Diagram Run-Time model from gmfmap.
+ * This extended version is expected to be modified by toolsmith to capture additional
+ * attributes/features of diagram.
+ * @author artem
+ */
+public class DiagramRunTimeModelTransformer extends MappingTransofrmer {
+ private final EPackage myPackage;
+
+ public DiagramRunTimeModelTransformer(String modelName, String modelNsURI) {
+ myPackage = EcoreFactory.eINSTANCE.createEPackage();
+ myPackage.setName(modelName);
+ myPackage.setNsPrefix(modelName+"-drt");
+ myPackage.setNsURI(modelNsURI);
+ }
+
+ public EPackage getResult() {
+ return myPackage;
+ }
+
+ protected void process(CanvasMapping cme) {
+ addEClass(cme.getDiagramCanvas(), DiagramRTPackage.eINSTANCE.getDiagramCanvas());
+ }
+
+ protected void process(NodeMapping nme) {
+ addEClass(nme.getDiagramNode(), DiagramRTPackage.eINSTANCE.getDiagramNode());
+ }
+
+ protected void process(LinkMapping lme) {
+ addEClass(lme.getDiagramLink(), DiagramRTPackage.eINSTANCE.getDiagramLink());
+ }
+
+ private void addEClass(CommonBase diaDefElement, EClass superClass) {
+ EClass c = createEClass(diaDefElement.getName(), superClass);
+ myPackage.getEClassifiers().add(c);
+ for (Iterator it = diaDefElement.getProperties().iterator(); it.hasNext();) {
+ RunTimeProperty p = (RunTimeProperty) it.next();
+ EAttribute a = EcoreFactory.eINSTANCE.createEAttribute();
+ a.setName(p.getName());
+ a.setEType(EcorePackage.eINSTANCE.getEString());
+ c.getEAttributes().add(a);
+ }
+ }
+
+ private EClass createEClass(String name, EClass superClass) {
+ EClass c = EcoreFactory.eINSTANCE.createEClass();
+ c.setName(name);
+ c.getESuperTypes().add(superClass);
+ return c;
+ }
+}
diff --git a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/EditPartNamingStrategy.java b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/EditPartNamingStrategy.java
new file mode 100644
index 000000000..1c6c1a647
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/EditPartNamingStrategy.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.bridge.genmodel;
+
+/**
+ * Naming for EditPart classes.
+ * @author artem
+ */
+public class EditPartNamingStrategy extends DefaultNamingStrategy {
+
+ protected String getLinkSuffix() {
+ return getNodeSuffix();
+ }
+
+ protected String getNodeSuffix() {
+ return "EditPart";
+ }
+
+ protected String getCanvasSuffix() {
+ return getNodeSuffix();
+ }
+
+ protected String getChildNodeSuffix() {
+ return "ChildNodeEditPart";
+ }
+}
diff --git a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/MappingTransofrmer.java b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/MappingTransofrmer.java
new file mode 100644
index 000000000..b32e966d6
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/MappingTransofrmer.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.bridge.genmodel;
+
+import java.util.Iterator;
+
+import org.eclipse.gmf.mappings.CanvasMapping;
+import org.eclipse.gmf.mappings.LinkMapping;
+import org.eclipse.gmf.mappings.Mapping;
+import org.eclipse.gmf.mappings.NodeMapping;
+
+/**
+ * Encapsulates iteration over diagram definition.
+ * @author artem
+ */
+public abstract class MappingTransofrmer {
+
+ public void transform(Mapping m) {
+ process(m.getDiagram());
+ for (Iterator it = m.getNodes().iterator(); it.hasNext();) {
+ process((NodeMapping) it.next());
+ }
+ for (Iterator it = m.getLinks().iterator(); it.hasNext();) {
+ process((LinkMapping) it.next());
+ }
+ }
+
+ protected abstract void process(CanvasMapping cme);
+ protected abstract void process(NodeMapping nme);
+ protected abstract void process(LinkMapping lme);
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/MetaInfoProviderNamingStrategy.java b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/MetaInfoProviderNamingStrategy.java
new file mode 100644
index 000000000..470eafdf3
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/MetaInfoProviderNamingStrategy.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.bridge.genmodel;
+
+public class MetaInfoProviderNamingStrategy extends DefaultNamingStrategy {
+
+ protected String getLinkSuffix() {
+ return getNodeSuffix();
+ }
+
+ protected String getNodeSuffix() {
+ return "MetaInfoProvider";
+ }
+
+ protected String getCanvasSuffix() {
+ return getNodeSuffix();
+ }
+
+ protected String getChildNodeSuffix() {
+ return getNodeSuffix();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/NamingStrategy.java b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/NamingStrategy.java
new file mode 100644
index 000000000..b8af9983c
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/NamingStrategy.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.bridge.genmodel;
+
+import org.eclipse.gmf.mappings.CanvasMapping;
+import org.eclipse.gmf.mappings.ChildNodeMapping;
+import org.eclipse.gmf.mappings.LinkMapping;
+import org.eclipse.gmf.mappings.NodeMapping;
+
+/**
+ * Means to provide your own names for classes being generated from genmodel.
+ * Return values (class names) are not expected to be fully-qualified names.
+ * <code>null</code> return value means use default naming scheme handcoded in genmodel impl.
+ * Instances of this class could be used as-is in case you are ok with naming scheme coded in genmodel
+ * @author artem
+ */
+public class NamingStrategy {
+
+ public String createClassName(NodeMapping nme) {
+ return null;
+ }
+
+ public String createClassName(ChildNodeMapping chnme) {
+ return null;
+ }
+
+ public String createClassName(LinkMapping lme) {
+ return null;
+ }
+
+ public String createClassName(CanvasMapping mapping) {
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/SpecificDiagramRunTimeModelHelper.java b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/SpecificDiagramRunTimeModelHelper.java
new file mode 100644
index 000000000..0462553a6
--- /dev/null
+++ b/plugins/org.eclipse.gmf.bridge/src/org/eclipse/gmf/bridge/genmodel/SpecificDiagramRunTimeModelHelper.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.bridge.genmodel;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
+import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
+import org.eclipse.gmf.mappings.CanvasMapping;
+import org.eclipse.gmf.mappings.ChildNodeMapping;
+import org.eclipse.gmf.mappings.LinkMapping;
+import org.eclipse.gmf.mappings.NodeMapping;
+
+/**
+ * Provides user-tuned runtime diagram presentation.
+ * @author artem
+ */
+public class SpecificDiagramRunTimeModelHelper extends BasicDiagramRunTimeModelHelper {
+ private final Map myName2GenClassMap;
+
+ /**
+ * @param drtGenModel user-defined diagram run-time model (still, should extend basic RT model)
+ */
+ public SpecificDiagramRunTimeModelHelper(GenModel drtGenModel) {
+ assert !drtGenModel.getGenPackages().isEmpty();
+ myName2GenClassMap = collectGenClasses(drtGenModel);
+ }
+
+ public GenClass get(NodeMapping nodeMapping) {
+ GenClass gc = getGenClass(nodeMapping.getDiagramNode().getName());
+ if (gc != null) {
+ return gc;
+ }
+ return super.get(nodeMapping);
+ }
+
+ public GenClass get(LinkMapping linkMapping) {
+ GenClass gc = getGenClass(linkMapping.getDiagramLink().getName());
+ if (gc != null) {
+ return gc;
+ }
+ return super.get(linkMapping);
+ }
+
+ public GenClass get(CanvasMapping canvasMapping) {
+ GenClass gc = getGenClass(canvasMapping.getDiagramCanvas().getName());
+ if (gc != null) {
+ return gc;
+ }
+ return super.get(canvasMapping);
+ }
+
+ public GenClass get(ChildNodeMapping childNodeMapping) {
+ GenClass gc = getGenClass(childNodeMapping.getDiagramNode().getName());
+ if (gc != null) {
+ return gc;
+ }
+ return super.get(childNodeMapping);
+ }
+
+ private Map collectGenClasses(GenModel drtGenModel) {
+ TreeMap rv = new TreeMap();
+ GenPackage genPack = (GenPackage) drtGenModel.getGenPackages().get(0);
+ for (Iterator it = genPack.getGenClasses().iterator(); it.hasNext();) {
+ GenClass next = (GenClass) it.next();
+ rv.put(next.getName(), next);
+ }
+ return rv;
+ }
+
+ private GenClass getGenClass(String name) {
+ return (GenClass) myName2GenClassMap.get(name);
+ }
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/.classpath b/plugins/org.eclipse.gmf.codegen.edit/.classpath
new file mode 100644
index 000000000..275b34c69
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.gmf.codegen.edit/.cvsignore b/plugins/org.eclipse.gmf.codegen.edit/.cvsignore
new file mode 100644
index 000000000..ba077a403
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/plugins/org.eclipse.gmf.codegen.edit/.project b/plugins/org.eclipse.gmf.codegen.edit/.project
new file mode 100644
index 000000000..e76b63b8d
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.gmf.codegen.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.gmf.codegen.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.gmf.codegen.edit/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..c01a3d512
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.gmf.codegen.edit; singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Activator: org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.gmf.codegen.gmfgen.presentation,
+ org.eclipse.gmf.codegen.gmfgen.provider
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources;visibility:=reexport,
+ org.eclipse.gmf.codegen;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.emf.edit.ui;visibility:=reexport,
+ org.eclipse.ui.ide;visibility:=reexport,
+ org.eclipse.emf.codegen.ecore.ui
+Eclipse-AutoStart: true
diff --git a/plugins/org.eclipse.gmf.codegen.edit/build.properties b/plugins/org.eclipse.gmf.codegen.edit/build.properties
new file mode 100644
index 000000000..47a68b422
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/build.properties
@@ -0,0 +1,8 @@
+bin.includes = plugin.xml,\
+ plugin.properties,\
+ icons/,\
+ META-INF/,\
+ .
+jars.compile.order = .
+source.. = src/
+output.. = bin/
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_links_GenLinkReferenceOnly.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_links_GenLinkReferenceOnly.gif
new file mode 100644
index 000000000..448f9b953
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_links_GenLinkReferenceOnly.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_links_GenLinkWithClass.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_links_GenLinkWithClass.gif
new file mode 100644
index 000000000..234a8ea4e
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_links_GenLinkWithClass.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_nodes_GenChildNode.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_nodes_GenChildNode.gif
new file mode 100644
index 000000000..62e68eb56
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_nodes_GenChildNode.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_nodes_GenNode.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_nodes_GenNode.gif
new file mode 100644
index 000000000..5b7a810e1
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_nodes_GenNode.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_palette_Palette.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_palette_Palette.gif
new file mode 100644
index 000000000..f3893b152
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenDiagram_palette_Palette.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenNode_childContainers_GenChildContainer.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenNode_childContainers_GenChildContainer.gif
new file mode 100644
index 000000000..e82a8e8c8
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenNode_childContainers_GenChildContainer.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenNode_childNodes_GenChildNode.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenNode_childNodes_GenChildNode.gif
new file mode 100644
index 000000000..8d18ec2d7
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateGenNode_childNodes_GenChildNode.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreatePalette_groups_ToolGroup.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreatePalette_groups_ToolGroup.gif
new file mode 100644
index 000000000..87b5b4a76
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreatePalette_groups_ToolGroup.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateToolGroup_linkTools_LinkEntry.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateToolGroup_linkTools_LinkEntry.gif
new file mode 100644
index 000000000..c94f08bf0
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateToolGroup_linkTools_LinkEntry.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateToolGroup_nodeTools_NodeEntry.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateToolGroup_nodeTools_NodeEntry.gif
new file mode 100644
index 000000000..c2235ab27
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/ctool16/CreateToolGroup_nodeTools_NodeEntry.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/DiagramGenMetaModelModelFile.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/DiagramGenMetaModelModelFile.gif
new file mode 100644
index 000000000..40ce4987d
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/DiagramGenMetaModelModelFile.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GMFGenModelFile.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GMFGenModelFile.gif
new file mode 100644
index 000000000..dd4fa0a2b
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GMFGenModelFile.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenChildContainer.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenChildContainer.gif
new file mode 100644
index 000000000..c8d381f0b
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenChildContainer.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenChildNode.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenChildNode.gif
new file mode 100644
index 000000000..35ef84e20
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenChildNode.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenDiagram.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenDiagram.gif
new file mode 100644
index 000000000..10d222998
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenDiagram.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenLinkReferenceOnly.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenLinkReferenceOnly.gif
new file mode 100644
index 000000000..1e5345fb3
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenLinkReferenceOnly.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenLinkWithClass.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenLinkWithClass.gif
new file mode 100644
index 000000000..10d222998
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenLinkWithClass.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenNode.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenNode.gif
new file mode 100644
index 000000000..591559182
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/GenNode.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/LinkEntry.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/LinkEntry.gif
new file mode 100644
index 000000000..be22463d2
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/LinkEntry.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/NodeEntry.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/NodeEntry.gif
new file mode 100644
index 000000000..14af8aaee
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/NodeEntry.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/Palette.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/Palette.gif
new file mode 100644
index 000000000..c673a5200
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/Palette.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/PaletteGenMetaModelModelFile.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/PaletteGenMetaModelModelFile.gif
new file mode 100644
index 000000000..415a3b6e0
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/PaletteGenMetaModelModelFile.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/ToolGroup.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/ToolGroup.gif
new file mode 100644
index 000000000..ed8747474
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/obj16/ToolGroup.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/wizban/NewDiagramGenMetaModel.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/wizban/NewDiagramGenMetaModel.gif
new file mode 100644
index 000000000..5f38f495c
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/wizban/NewDiagramGenMetaModel.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/wizban/NewGMFGen.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/wizban/NewGMFGen.gif
new file mode 100644
index 000000000..e52cb90c7
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/wizban/NewGMFGen.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/icons/full/wizban/NewPaletteGenMetaModel.gif b/plugins/org.eclipse.gmf.codegen.edit/icons/full/wizban/NewPaletteGenMetaModel.gif
new file mode 100644
index 000000000..acfcd368e
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/icons/full/wizban/NewPaletteGenMetaModel.gif
Binary files differ
diff --git a/plugins/org.eclipse.gmf.codegen.edit/plugin.properties b/plugins/org.eclipse.gmf.codegen.edit/plugin.properties
new file mode 100644
index 000000000..259f34b50
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/plugin.properties
@@ -0,0 +1,165 @@
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+# ====================================================================
+# To code developer:
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# ====================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# ====================================================================
+
+pluginName = GMF GenModel Edit Support
+providerName = Eclipse.org
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_GenDiagram_type = Gen Diagram
+_UI_GenCommonBase_type = Gen Common Base
+_UI_GenBaseElement_type = Gen Base Element
+_UI_GenNode_type = Gen Node
+_UI_GenChildNode_type = Gen Child Node
+_UI_GenChildContainer_type = Gen Child Container
+_UI_GenLink_type = Gen Link
+_UI_GenLinkWithClass_type = Gen Link With Class
+_UI_GenLinkReferenceOnly_type = Gen Link Reference Only
+_UI_Palette_type = Palette
+_UI_EntryBase_type = Entry Base
+_UI_ToolEntry_type = Tool Entry
+_UI_NodeEntry_type = Node Entry
+_UI_LinkEntry_type = Link Entry
+_UI_ToolGroup_type = Tool Group
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_GenDiagram_domainMetaModel_feature = Domain Meta Model
+_UI_GenDiagram_emfGenModel_feature = Emf Gen Model
+_UI_GenDiagram_domainDiagramElement_feature = Domain Diagram Element
+_UI_GenDiagram_nodes_feature = Nodes
+_UI_GenDiagram_links_feature = Links
+_UI_GenDiagram_palette_feature = Palette
+_UI_GenDiagram_editPartsPackageName_feature = Edit Parts Package Name
+_UI_GenDiagram_commandsPackageName_feature = Commands Package Name
+_UI_GenDiagram_editProvidersPackageName_feature = Edit Providers Package Name
+_UI_GenDiagram_pluginName_feature = Plugin Name
+_UI_GenDiagram_providerName_feature = Provider Name
+_UI_GenDiagram_pluginID_feature = Plugin ID
+_UI_GenDiagram_pluginClassName_feature = Plugin Class Name
+_UI_GenDiagram_editorPackageName_feature = Editor Package Name
+_UI_GenDiagram_editorClassName_feature = Editor Class Name
+_UI_GenDiagram_editPartFactoryClassName_feature = Edit Part Factory Class Name
+_UI_GenDiagram_metaInfoFactoryClassName_feature = Meta Info Factory Class Name
+_UI_GenDiagram_hasDomainModel_feature = Has Domain Model
+_UI_GenDiagram_diagramFileExtension_feature = Diagram File Extension
+_UI_GenDiagram_sameFileForDiagramAndModel_feature = Same File For Diagram And Model
+_UI_GenCommonBase_diagramRunTimeClass_feature = Diagram Run Time Class
+_UI_GenCommonBase_visualID_feature = Visual ID
+_UI_GenCommonBase_editPartClassName_feature = Edit Part Class Name
+_UI_GenCommonBase_metaInfoProviderClassName_feature = Meta Info Provider Class Name
+_UI_GenCommonBase_metaInfoProviderQualifiedClassName_feature = Meta Info Provider Qualified Class Name
+_UI_GenCommonBase_classNamePrefix_feature = Class Name Prefix
+_UI_GenCommonBase_classNameSuffux_feature = Class Name Suffux
+_UI_GenBaseElement_domainNameFeature_feature = Domain Name Feature
+_UI_GenBaseElement_foregroundColor_feature = Foreground Color
+_UI_GenBaseElement_containmentMetaFeature_feature = Containment Meta Feature
+_UI_GenNode_diagram_feature = Diagram
+_UI_GenNode_domainMetaClass_feature = Domain Meta Class
+_UI_GenNode_viewmapURI_feature = Viewmap URI
+_UI_GenNode_nodeVisualizationKind_feature = Node Visualization Kind
+_UI_GenNode_viewmapClass_feature = Viewmap Class
+_UI_GenNode_affixedStereotypes_feature = Affixed Stereotypes
+_UI_GenNode_backgroundColor_feature = Background Color
+_UI_GenNode_childContainers_feature = Child Containers
+_UI_GenNode_childNodes_feature = Child Nodes
+_UI_GenNode_childContainersPlacement_feature = Child Containers Placement
+_UI_GenChildNode_groupID_feature = Group ID
+_UI_GenChildNode_parentNode_feature = Parent Node
+_UI_GenChildNode_childMetaFeature_feature = Child Meta Feature
+_UI_GenChildContainer_groupID_feature = Group ID
+_UI_GenChildContainer_titleKey_feature = Title Key
+_UI_GenChildContainer_canCollapse_feature = Can Collapse
+_UI_GenChildContainer_hideIfEmpty_feature = Hide If Empty
+_UI_GenChildContainer_needsTitle_feature = Needs Title
+_UI_GenChildContainer_layoutKind_feature = Layout Kind
+_UI_GenLink_diagram_feature = Diagram
+_UI_GenLink_domainLinkTargetFeature_feature = Domain Link Target Feature
+_UI_GenLink_lineStyle_feature = Line Style
+_UI_GenLink_figureQualifiedClassName_feature = Figure Qualified Class Name
+_UI_GenLink_sourceDecorationFigureQualifiedClassName_feature = Source Decoration Figure Qualified Class Name
+_UI_GenLink_targetDecorationFigureQualifiedClassName_feature = Target Decoration Figure Qualified Class Name
+_UI_GenLinkWithClass_domainMetaClass_feature = Domain Meta Class
+_UI_GenLinkWithClass_linkContainerFeature_feature = Link Container Feature
+_UI_Palette_diagram_feature = Diagram
+_UI_Palette_groups_feature = Groups
+_UI_Palette_flyout_feature = Flyout
+_UI_Palette_needZoomTools_feature = Need Zoom Tools
+_UI_Palette_packageName_feature = Package Name
+_UI_Palette_factoryClassName_feature = Factory Class Name
+_UI_EntryBase_order_feature = Order
+_UI_EntryBase_titleKey_feature = Title Key
+_UI_EntryBase_descriptionKey_feature = Description Key
+_UI_EntryBase_largeIconPath_feature = Large Icon Path
+_UI_EntryBase_smallIconPath_feature = Small Icon Path
+_UI_ToolEntry_default_feature = Default
+_UI_NodeEntry_genNode_feature = Gen Node
+_UI_NodeEntry_group_feature = Group
+_UI_LinkEntry_genLink_feature = Gen Link
+_UI_LinkEntry_group_feature = Group
+_UI_ToolGroup_nodeTools_feature = Node Tools
+_UI_ToolGroup_linkTools_feature = Link Tools
+_UI_ToolGroup_palette_feature = Palette
+_UI_Unknown_feature = Unspecified
+
+_UI_CompartmentPlacementKind_FLOW_literal = FLOW
+_UI_CompartmentPlacementKind_TOOLBAR_literal = TOOLBAR
+_UI_CompartmentLayoutKind_BORDER_literal = BORDER
+_UI_CompartmentLayoutKind_FLOW_literal = FLOW
+_UI_CompartmentLayoutKind_SCROLL_literal = SCROLL
+_UI_CompartmentLayoutKind_TOOLBAR_literal = TOOLBAR
+_UI_CompartmentLayoutKind_XY_literal = XY
+_UI_GMFGenEditor_menu = &GMFGen Editor
+ _UI_CreateChild_menu_item = &New Child
+_UI_CreateSibling_menu_item = N&ew Sibling
+ _UI_ShowPropertiesView_menu_item = Show &Properties View
+_UI_RefreshViewer_menu_item = &Refresh
+ _UI_SelectionPage_label = Selection
+_UI_ParentPage_label = Parent
+_UI_ListPage_label = List
+_UI_TreePage_label = Tree
+_UI_TablePage_label = Table
+_UI_TreeWithColumnsPage_label = Tree with Columns
+_UI_ObjectColumn_label = Object
+_UI_SelfColumn_label = Self
+ _UI_NoObjectSelected = Selected Nothing
+_UI_SingleObjectSelected = Selected Object: {0}
+_UI_MultiObjectSelected = Selected {0} Objects
+ _UI_OpenEditorError_label = Open Editor
+ _UI_Wizard_category = Example EMF Model Creation Wizards
+ _UI_GMFGenModelWizard_label = GMFGen Model
+_UI_GMFGenModelWizard_description = Create a new GMFGen model
+ _UI_GMFGenEditor_label = GMFGen Model Editor
+ _UI_GMFGenEditorFilenameDefaultBase = My
+_UI_GMFGenEditorFilenameExtension = gmfgen
+ _UI_Wizard_label = New
+ _WARN_FilenameExtension = The file name must end in ".{0}"
+ _UI_ModelObject = Model Object
+_UI_XMLEncoding = XML Encoding
+_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1
+_UI_Wizard_initial_object_description = Select a model object to create
+ _UI_FileConflict_label = File Conflict
+_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes?
+
diff --git a/plugins/org.eclipse.gmf.codegen.edit/plugin.xml b/plugins/org.eclipse.gmf.codegen.edit/plugin.xml
new file mode 100644
index 000000000..c74910e90
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/plugin.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ <copyright>
+ </copyright>
+
+ $Id$
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri = "http://www.eclipse.org/gmf/2005/GenModel"
+ class = "org.eclipse.gmf.codegen.gmfgen.provider.GMFGenItemProviderAdapterFactory"
+ supportedTypes =
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource" />
+ </extension>
+
+
+ <extension
+ point = "org.eclipse.ui.newWizards">
+ <category
+ id = "org.eclipse.emf.ecore.Wizard.category.ID"
+ name="%_UI_Wizard_category">
+ </category>
+ <wizard
+ id = "org.eclipse.gmf.codegen.gmfgen.presentation.GMFGenModelWizardID"
+ name = "%_UI_GMFGenModelWizard_label"
+ class = "org.eclipse.gmf.codegen.gmfgen.presentation.GMFGenModelWizard"
+ category = "org.eclipse.emf.ecore.Wizard.category.ID"
+ icon = "icons/full/obj16/GMFGenModelFile.gif">
+ <description>%_UI_GMFGenModelWizard_description</description>
+ <selection class = "org.eclipse.core.resources.IResource" />
+ </wizard>
+ </extension>
+
+ <extension point = "org.eclipse.ui.editors">
+ <editor
+ id = "org.eclipse.gmf.codegen.gmfgen.presentation.GMFGenEditorID"
+ name = "%_UI_GMFGenEditor_label"
+ icon = "icons/full/obj16/GMFGenModelFile.gif"
+ extensions = "gmfgen"
+ class = "org.eclipse.gmf.codegen.gmfgen.presentation.GMFGenEditor"
+ contributorClass="org.eclipse.gmf.codegen.gmfgen.presentation.GMFGenActionBarContributor" >
+ </editor>
+ </extension>
+</plugin>
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/EditorPlugin.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/EditorPlugin.java
new file mode 100644
index 000000000..ec8d6ec4b
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/EditorPlugin.java
@@ -0,0 +1,98 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.presentation;
+
+import org.eclipse.emf.codegen.ecore.genmodel.provider.GenModelEditPlugin;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+
+/**
+ * This is the central singleton for the GMFGen editor plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class EditorPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EditorPlugin INSTANCE = new EditorPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditorPlugin() {
+ super
+ (new ResourceLocator [] {
+ GenModelEditPlugin.INSTANCE,
+ EcoreEditPlugin.INSTANCE,
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenActionBarContributor.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenActionBarContributor.java
new file mode 100644
index 000000000..1f6adf9f9
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenActionBarContributor.java
@@ -0,0 +1,407 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.presentation;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+
+import org.eclipse.emf.edit.ui.action.CreateChildAction;
+import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.action.LoadResourceAction;
+import org.eclipse.emf.edit.ui.action.ValidateAction;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.SubContributionItem;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.Viewer;
+
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * This is the action bar contributor for the GMFGen model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GMFGenActionBarContributor
+ extends EditingDomainActionBarContributor
+ implements ISelectionChangedListener {
+ /**
+ * This keeps track of the active editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IEditorPart activeEditorPart;
+
+ /**
+ * This keeps track of the current selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelectionProvider selectionProvider;
+
+ /**
+ * This action opens the Properties view.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IAction showPropertiesViewAction =
+ new Action(EditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) {
+ public void run() {
+ try {
+ getPage().showView("org.eclipse.ui.views.PropertySheet");
+ }
+ catch (PartInitException exception) {
+ EditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * This action refreshes the viewer of the current editor if the editor
+ * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IAction refreshViewerAction =
+ new Action(EditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) {
+ public boolean isEnabled() {
+ return activeEditorPart instanceof IViewerProvider;
+ }
+
+ public void run() {
+ if (activeEditorPart instanceof IViewerProvider) {
+ Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer();
+ if (viewer != null) {
+ viewer.refresh();
+ }
+ }
+ }
+ };
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection createChildActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be added for CreateChild actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IMenuManager createChildMenuManager;
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection createSiblingActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be added for CreateSibling actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IMenuManager createSiblingMenuManager;
+
+ /**
+ * This creates an instance of the contributor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GMFGenActionBarContributor() {
+ loadResourceAction = new LoadResourceAction();
+ validateAction = new ValidateAction();
+ }
+
+ /**
+ * This adds Separators for editor additions to the tool bar.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void contributeToToolBar(IToolBarManager toolBarManager) {
+ toolBarManager.add(new Separator("gmfgen-settings"));
+ toolBarManager.add(new Separator("gmfgen-additions"));
+ }
+
+ /**
+ * This adds to the menu bar a menu and some separators for editor additions,
+ * as well as the sub-menus for object creation items.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void contributeToMenu(IMenuManager menuManager) {
+ super.contributeToMenu(menuManager);
+
+ IMenuManager submenuManager = new MenuManager(EditorPlugin.INSTANCE.getString("_UI_GMFGenEditor_menu"), "org.eclipse.gmf.codegen.gmfgenMenuID");
+ menuManager.insertAfter("additions", submenuManager);
+ submenuManager.add(new Separator("settings"));
+ submenuManager.add(new Separator("actions"));
+ submenuManager.add(new Separator("additions"));
+ submenuManager.add(new Separator("additions-end"));
+
+ // Prepare for CreateChild item addition or removal.
+ //
+ createChildMenuManager = new MenuManager(EditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
+ submenuManager.insertBefore("additions", createChildMenuManager);
+
+ // Prepare for CreateSibling item addition or removal.
+ //
+ createSiblingMenuManager = new MenuManager(EditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
+ submenuManager.insertBefore("additions", createSiblingMenuManager);
+
+ // Force an update because Eclipse hides empty menus now.
+ //
+ submenuManager.addMenuListener
+ (new IMenuListener() {
+ public void menuAboutToShow(IMenuManager menuManager) {
+ menuManager.updateAll(true);
+ }
+ });
+
+ addGlobalActions(submenuManager);
+ }
+
+ /**
+ * When the active editor changes, this remembers the change and registers with it as a selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setActiveEditor(IEditorPart part) {
+ super.setActiveEditor(part);
+ activeEditorPart = part;
+
+ // Switch to the new selection provider.
+ //
+ if (selectionProvider != null) {
+ selectionProvider.removeSelectionChangedListener(this);
+ }
+ if (part == null) {
+ selectionProvider = null;
+ }
+ else {
+ selectionProvider = part.getSite().getSelectionProvider();
+ selectionProvider.addSelectionChangedListener(this);
+
+ // Fake a selection changed event to update the menus.
+ //
+ if (selectionProvider.getSelection() != null) {
+ selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection()));
+ }
+ }
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
+ * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
+ * that can be added to the selected object and updating the menus accordingly.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void selectionChanged(SelectionChangedEvent event) {
+ // Remove any menu items for old selection.
+ //
+ if (createChildMenuManager != null) {
+ depopulateManager(createChildMenuManager, createChildActions);
+ }
+ if (createSiblingMenuManager != null) {
+ depopulateManager(createSiblingMenuManager, createSiblingActions);
+ }
+
+ // Query the new selection for appropriate new child/sibling descriptors
+ //
+ Collection newChildDescriptors = null;
+ Collection newSiblingDescriptors = null;
+
+ ISelection selection = event.getSelection();
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) {
+ Object object = ((IStructuredSelection)selection).getFirstElement();
+
+ EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain();
+
+ newChildDescriptors = domain.getNewChildDescriptors(object, null);
+ newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
+ }
+
+ // Generate actions for selection; populate and redraw the menus.
+ //
+ createChildActions = generateCreateChildActions(newChildDescriptors, selection);
+ createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
+
+ if (createChildMenuManager != null) {
+ populateManager(createChildMenuManager, createChildActions, null);
+ createChildMenuManager.update(true);
+ }
+ if (createSiblingMenuManager != null) {
+ populateManager(createSiblingMenuManager, createSiblingActions, null);
+ createSiblingMenuManager.update(true);
+ }
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection generateCreateChildActions(Collection descriptors, ISelection selection) {
+ Collection actions = new ArrayList();
+ if (descriptors != null) {
+ for (Iterator i = descriptors.iterator(); i.hasNext(); ) {
+ actions.add(new CreateChildAction(activeEditorPart, selection, i.next()));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection generateCreateSiblingActions(Collection descriptors, ISelection selection) {
+ Collection actions = new ArrayList();
+ if (descriptors != null) {
+ for (Iterator i = descriptors.iterator(); i.hasNext(); ) {
+ actions.add(new CreateSiblingAction(activeEditorPart, selection, i.next()));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection,
+ * by inserting them before the specified contribution item <code>contributionID</code>.
+ * If <code>ID</code> is <code>null</code>, they are simply added.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void populateManager(IContributionManager manager, Collection actions, String contributionID) {
+ if (actions != null) {
+ for (Iterator i = actions.iterator(); i.hasNext(); ) {
+ IAction action = (IAction)i.next();
+ if (contributionID != null) {
+ manager.insertBefore(contributionID, action);
+ }
+ else {
+ manager.add(action);
+ }
+ }
+ }
+ }
+
+ /**
+ * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void depopulateManager(IContributionManager manager, Collection actions) {
+ if (actions != null) {
+ IContributionItem[] items = manager.getItems();
+ for (int i = 0; i < items.length; i++) {
+ // Look into SubContributionItems
+ //
+ IContributionItem contributionItem = items[i];
+ while (contributionItem instanceof SubContributionItem) {
+ contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
+ }
+
+ // Delete the ActionContributionItems with matching action.
+ //
+ if (contributionItem instanceof ActionContributionItem) {
+ IAction action = ((ActionContributionItem)contributionItem).getAction();
+ if (actions.contains(action)) {
+ manager.remove(contributionItem);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This populates the pop-up menu before it appears.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void menuAboutToShow(IMenuManager menuManager) {
+ super.menuAboutToShow(menuManager);
+ MenuManager submenuManager = null;
+
+ submenuManager = new MenuManager(EditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
+ populateManager(submenuManager, createChildActions, null);
+ menuManager.insertBefore("additions", submenuManager);
+
+ submenuManager = new MenuManager(EditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
+ populateManager(submenuManager, createSiblingActions, null);
+ menuManager.insertBefore("additions", submenuManager);
+ }
+
+ /**
+ * This inserts global actions before the "additions-end" separator.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addGlobalActions(IMenuManager menuManager) {
+ menuManager.insertAfter("additions-end", new Separator("ui-actions"));
+ menuManager.insertAfter("ui-actions", showPropertiesViewAction);
+
+ refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
+ menuManager.insertAfter("ui-actions", refreshViewerAction);
+
+ super.addGlobalActions(menuManager);
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenEditor.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenEditor.java
new file mode 100644
index 000000000..2b306ffd7
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenEditor.java
@@ -0,0 +1,1460 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.presentation;
+
+
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+
+import org.eclipse.emf.common.ui.ViewerPane;
+
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EValidator;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import java.io.IOException;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EventObject;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.custom.CTabFolder;
+
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.Transfer;
+
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWorkbenchPart;
+
+import org.eclipse.ui.dialogs.SaveAsDialog;
+
+import org.eclipse.ui.ide.IGotoMarker;
+
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.MultiPageEditorPart;
+
+import org.eclipse.ui.views.contentoutline.ContentOutline;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.PropertySheet;
+import org.eclipse.ui.views.properties.PropertySheetPage;
+
+import org.eclipse.gmf.codegen.gmfgen.provider.GMFGenItemProviderAdapterFactory;
+
+
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+import org.eclipse.emf.codegen.ecore.genmodel.provider.GenModelItemProviderAdapterFactory;
+
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+
+/**
+ * This is an example of a GMFGen model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GMFGenEditor
+ extends MultiPageEditorPart
+ implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker {
+ /**
+ * This keeps track of the editing domain that is used to track all changes to the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AdapterFactoryEditingDomain editingDomain;
+
+ /**
+ * This is the one adapter factory used for providing views of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory adapterFactory;
+
+ /**
+ * This is the content outline page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IContentOutlinePage contentOutlinePage;
+
+ /**
+ * This is a kludge...
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IStatusLineManager contentOutlineStatusLineManager;
+
+ /**
+ * This is the content outline page's viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer contentOutlineViewer;
+
+ /**
+ * This is the property sheet page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PropertySheetPage propertySheetPage;
+
+ /**
+ * This is the viewer that shadows the selection in the content outline.
+ * The parent relation must be correctly defined for this to work.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer selectionViewer;
+
+ /**
+ * This inverts the roll of parent and child in the content provider and show parents as a tree.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer parentViewer;
+
+ /**
+ * This shows how a tree view works.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer treeViewer;
+
+ /**
+ * This shows how a list view works.
+ * A list viewer doesn't support icons.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ListViewer listViewer;
+
+ /**
+ * This shows how a table view works.
+ * A table can be used as a list with icons.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TableViewer tableViewer;
+
+ /**
+ * This shows how a tree view with columns works.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer treeViewerWithColumns;
+
+ /**
+ * This keeps track of the active viewer pane, in the book.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ViewerPane currentViewerPane;
+
+ /**
+ * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Viewer currentViewer;
+
+ /**
+ * This listens to which ever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelectionChangedListener selectionChangedListener;
+
+ /**
+ * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection selectionChangedListeners = new ArrayList();
+
+ /**
+ * This keeps track of the selection of the editor as a whole.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelection editorSelection = StructuredSelection.EMPTY;
+
+ /**
+ * This listens for when the outline becomes active
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IPartListener partListener =
+ new IPartListener() {
+ public void partActivated(IWorkbenchPart p) {
+ if (p instanceof ContentOutline) {
+ if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
+ getActionBarContributor().setActiveEditor(GMFGenEditor.this);
+
+ setCurrentViewer(contentOutlineViewer);
+ }
+ }
+ else if (p instanceof PropertySheet) {
+ if (((PropertySheet)p).getCurrentPage() == propertySheetPage) {
+ getActionBarContributor().setActiveEditor(GMFGenEditor.this);
+ handleActivate();
+ }
+ }
+ else if (p == GMFGenEditor.this) {
+ handleActivate();
+ }
+ }
+ public void partBroughtToTop(IWorkbenchPart p) {
+ }
+ public void partClosed(IWorkbenchPart p) {
+ }
+ public void partDeactivated(IWorkbenchPart p) {
+ }
+ public void partOpened(IWorkbenchPart p) {
+ }
+ };
+
+ /**
+ * Resources that have been removed since last activation.
+ * @generated
+ */
+ Collection removedResources = new ArrayList();
+
+ /**
+ * Resources that have been changed since last activation.
+ * @generated
+ */
+ Collection changedResources = new ArrayList();
+
+ /**
+ * Resources that have been saved.
+ * @generated
+ */
+ Collection savedResources = new ArrayList();
+
+ /**
+ * This listens for workspace changes.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IResourceChangeListener resourceChangeListener =
+ new IResourceChangeListener() {
+ public void resourceChanged(IResourceChangeEvent event) {
+ // Only listening to these.
+ // if (event.getType() == IResourceDelta.POST_CHANGE)
+ {
+ IResourceDelta delta = event.getDelta();
+ try {
+ class ResourceDeltaVisitor implements IResourceDeltaVisitor {
+ protected ResourceSet resourceSet = editingDomain.getResourceSet();
+ protected Collection changedResources = new ArrayList();
+ protected Collection removedResources = new ArrayList();
+
+ public boolean visit(IResourceDelta delta) {
+ if (delta.getFlags() != IResourceDelta.MARKERS &&
+ delta.getResource().getType() == IResource.FILE) {
+ if ((delta.getKind() & (IResourceDelta.CHANGED | IResourceDelta.REMOVED)) != 0) {
+ Resource resource = resourceSet.getResource(URI.createURI(delta.getFullPath().toString()), false);
+ if (resource != null) {
+ if ((delta.getKind() & IResourceDelta.REMOVED) != 0) {
+ removedResources.add(resource);
+ }
+ else {
+ changedResources.add(resource);
+ }
+ }
+ }
+ }
+
+ return true;
+ }
+
+ public Collection getChangedResources() {
+ return changedResources;
+ }
+
+ public Collection getRemovedResources() {
+ return removedResources;
+ }
+ }
+
+ ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();
+ delta.accept(visitor);
+
+ if (!visitor.getRemovedResources().isEmpty()) {
+ removedResources.addAll(visitor.getRemovedResources());
+ if (!isDirty()) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ getSite().getPage().closeEditor(GMFGenEditor.this, false);
+ GMFGenEditor.this.dispose();
+ }
+ });
+ }
+ }
+
+ if (!visitor.getChangedResources().isEmpty()) {
+ changedResources.addAll(visitor.getChangedResources());
+ }
+ }
+ catch (CoreException exception) {
+ EditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ }
+ };
+
+ /**
+ * Handles activation of the editor or it's associated views.
+ * @generated
+ */
+ protected void handleActivate() {
+ // Recompute the read only state.
+ //
+ if (editingDomain.getResourceToReadOnlyMap() != null) {
+ editingDomain.getResourceToReadOnlyMap().clear();
+
+ // Refresh any actions that may become enabled or disabled.
+ //
+ setSelection(getSelection());
+ }
+
+ if (!removedResources.isEmpty()) {
+ if (handleDirtyConflict()) {
+ getSite().getPage().closeEditor(GMFGenEditor.this, false);
+ GMFGenEditor.this.dispose();
+ }
+ else {
+ removedResources.clear();
+ changedResources.clear();
+ savedResources.clear();
+ }
+ }
+ else if (!changedResources.isEmpty()) {
+ changedResources.removeAll(savedResources);
+ handleChangedResources();
+ changedResources.clear();
+ savedResources.clear();
+ }
+ }
+
+
+ /**
+ * Handles what to do with changed resources on activation.
+ * @generated
+ */
+ protected void handleChangedResources() {
+ if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
+ editingDomain.getCommandStack().flush();
+
+ for (Iterator i = changedResources.iterator(); i.hasNext(); ) {
+ Resource resource = (Resource)i.next();
+ if (resource.isLoaded()) {
+ resource.unload();
+ try {
+ resource.load(Collections.EMPTY_MAP);
+ }
+ catch (IOException exception) {
+ EditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Shows a dialog that asks if conflicting changes should be discarded.
+ * @generated
+ */
+ protected boolean handleDirtyConflict() {
+ return
+ MessageDialog.openQuestion
+ (getSite().getShell(),
+ getString("_UI_FileConflict_label"),
+ getString("_WARN_FileConflict"));
+ }
+
+ /**
+ * This creates a model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GMFGenEditor() {
+ super();
+
+ // Create an adapter factory that yields item providers.
+ //
+ List factories = new ArrayList();
+ factories.add(new ResourceItemProviderAdapterFactory());
+ factories.add(new GMFGenItemProviderAdapterFactory());
+ factories.add(new GenModelItemProviderAdapterFactory());
+ factories.add(new EcoreItemProviderAdapterFactory());
+ factories.add(new ReflectiveItemProviderAdapterFactory());
+
+ adapterFactory = new ComposedAdapterFactory(factories);
+
+ // Create the command stack that will notify this editor as commands are executed.
+ //
+ BasicCommandStack commandStack = new BasicCommandStack();
+
+ // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
+ //
+ commandStack.addCommandStackListener
+ (new CommandStackListener() {
+ public void commandStackChanged(final EventObject event) {
+ getContainer().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+
+ // Try to select the affected objects.
+ //
+ Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
+ if (mostRecentCommand != null) {
+ setSelectionToViewer(mostRecentCommand.getAffectedObjects());
+ }
+ if (propertySheetPage != null) {
+ propertySheetPage.refresh();
+ }
+ }
+ });
+ }
+ });
+
+ // Create the editing domain with a special command stack.
+ //
+ editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap());
+ }
+
+ /**
+ * This is here for the listener to be able to call it.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void firePropertyChange(int action) {
+ super.firePropertyChange(action);
+ }
+
+ /**
+ * This sets the selection into whichever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelectionToViewer(Collection collection) {
+ final Collection theSelection = collection;
+ // Make sure it's okay.
+ //
+ if (theSelection != null && !theSelection.isEmpty()) {
+ // I don't know if this should be run this deferred
+ // because we might have to give the editor a chance to process the viewer update events
+ // and hence to update the views first.
+ //
+ //
+ Runnable runnable =
+ new Runnable() {
+ public void run() {
+ // Try to select the items in the current content viewer of the editor.
+ //
+ if (currentViewer != null) {
+ currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
+ }
+ }
+ };
+ runnable.run();
+ }
+ }
+
+ /**
+ * This returns the editing domain as required by the {@link IEditingDomainProvider} interface.
+ * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain}
+ * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditingDomain getEditingDomain() {
+ return editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider {
+ public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ public Object [] getElements(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ public Object [] getChildren(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ public boolean hasChildren(Object object) {
+ Object parent = super.getParent(object);
+ return parent != null;
+ }
+
+ public Object getParent(Object object) {
+ return null;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCurrentViewerPane(ViewerPane viewerPane) {
+ if (currentViewerPane != viewerPane) {
+ if (currentViewerPane != null) {
+ currentViewerPane.showFocus(false);
+ }
+ currentViewerPane = viewerPane;
+ }
+ setCurrentViewer(currentViewerPane.getViewer());
+ }
+
+ /**
+ * This makes sure that one content viewer, either for the current page or the outline view, if it has focus,
+ * is the current one.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCurrentViewer(Viewer viewer) {
+ // If it is changing...
+ //
+ if (currentViewer != viewer) {
+ if (selectionChangedListener == null) {
+ // Create the listener on demand.
+ //
+ selectionChangedListener =
+ new ISelectionChangedListener() {
+ // This just notifies those things that are affected by the section.
+ //
+ public void selectionChanged(SelectionChangedEvent selectionChangedEvent) {
+ setSelection(selectionChangedEvent.getSelection());
+ }
+ };
+ }
+
+ // Stop listening to the old one.
+ //
+ if (currentViewer != null) {
+ currentViewer.removeSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Start listening to the new one.
+ //
+ if (viewer != null) {
+ viewer.addSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Remember it.
+ //
+ currentViewer = viewer;
+
+ // Set the editors selection based on the current viewer's selection.
+ //
+ setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());
+ }
+ }
+
+ /**
+ * This returns the viewer as required by the {@link IViewerProvider} interface.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Viewer getViewer() {
+ return currentViewer;
+ }
+
+ /**
+ * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createContextMenuFor(StructuredViewer viewer) {
+ MenuManager contextMenu = new MenuManager("#PopUp");
+ contextMenu.add(new Separator("additions"));
+ contextMenu.setRemoveAllWhenShown(true);
+ contextMenu.addMenuListener(this);
+ Menu menu= contextMenu.createContextMenu(viewer.getControl());
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(contextMenu, viewer);
+
+ int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
+ Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance() };
+ viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
+ }
+
+ /**
+ * This is the method called to load a resource into the editing domain's resource set based on the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createModel() {
+ // I assume that the input is a file object.
+ //
+ IFileEditorInput modelFile = (IFileEditorInput)getEditorInput();
+
+ try {
+ // Load the resource through the editing domain.
+ //
+ editingDomain.loadResource(URI.createPlatformResourceURI(modelFile.getFile().getFullPath().toString()).toString());
+ }
+ catch (Exception exception) {
+ EditorPlugin.INSTANCE.log(exception);
+ }
+ }
+
+ /**
+ * This is the method used by the framework to install your own controls.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPages() {
+ // Creates the model from the editor input
+ //
+ createModel();
+
+ // Create a page for the selection tree view.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), GMFGenEditor.this) {
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ selectionViewer = (TreeViewer)viewerPane.getViewer();
+ selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+
+ selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ selectionViewer.setInput(editingDomain.getResourceSet());
+ viewerPane.setTitle(editingDomain.getResourceSet());
+
+ new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(selectionViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_SelectionPage_label"));
+ }
+
+ // Create a page for the parent tree view.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), GMFGenEditor.this) {
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ parentViewer = (TreeViewer)viewerPane.getViewer();
+ parentViewer.setAutoExpandLevel(30);
+ parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
+ parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(parentViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ParentPage_label"));
+ }
+
+ // This is the page for the list viewer
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), GMFGenEditor.this) {
+ public Viewer createViewer(Composite composite) {
+ return new ListViewer(composite);
+ }
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ listViewer = (ListViewer)viewerPane.getViewer();
+ listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(listViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ListPage_label"));
+ }
+
+ // This is the page for the tree viewer
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), GMFGenEditor.this) {
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ treeViewer = (TreeViewer)viewerPane.getViewer();
+ treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(treeViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreePage_label"));
+ }
+
+ // This is the page for the table viewer.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), GMFGenEditor.this) {
+ public Viewer createViewer(Composite composite) {
+ return new TableViewer(composite);
+ }
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ tableViewer = (TableViewer)viewerPane.getViewer();
+
+ Table table = tableViewer.getTable();
+ TableLayout layout = new TableLayout();
+ table.setLayout(layout);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ TableColumn objectColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(3, 100, true));
+ objectColumn.setText(getString("_UI_ObjectColumn_label"));
+ objectColumn.setResizable(true);
+
+ TableColumn selfColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(2, 100, true));
+ selfColumn.setText(getString("_UI_SelfColumn_label"));
+ selfColumn.setResizable(true);
+
+ tableViewer.setColumnProperties(new String [] {"a", "b"});
+ tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(tableViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TablePage_label"));
+ }
+
+ // This is the page for the table tree viewer.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), GMFGenEditor.this) {
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
+
+ Tree tree = treeViewerWithColumns.getTree();
+ tree.setLayoutData(new FillLayout());
+ tree.setHeaderVisible(true);
+ tree.setLinesVisible(true);
+
+ TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE);
+ objectColumn.setText(getString("_UI_ObjectColumn_label"));
+ objectColumn.setResizable(true);
+ objectColumn.setWidth(250);
+
+ TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE);
+ selfColumn.setText(getString("_UI_SelfColumn_label"));
+ selfColumn.setResizable(true);
+ selfColumn.setWidth(200);
+
+ treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"});
+ treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(treeViewerWithColumns);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label"));
+ }
+
+ setActivePage(0);
+
+ getContainer().addControlListener
+ (new ControlAdapter() {
+ boolean guard = false;
+ public void controlResized(ControlEvent event) {
+ if (!guard) {
+ guard = true;
+ hideTabs();
+ guard = false;
+ }
+ }
+ });
+ }
+
+ /**
+ * If there is just one page in the multi-page editor part, this hides
+ * the single tab at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void hideTabs() {
+ if (getPageCount() <= 1) {
+ setPageText(0, "");
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder)getContainer()).setTabHeight(1);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y + 6);
+ }
+ }
+ }
+
+ /**
+ * This is used to track the active viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void pageChange(int pageIndex) {
+ super.pageChange(pageIndex);
+
+ // This is a temporary workaround... EATM
+ //
+ Control control = getControl(pageIndex);
+ if (control != null) {
+ control.setVisible(true);
+ control.setFocus();
+ }
+
+ if (contentOutlinePage != null) {
+ handleContentOutlineSelection(contentOutlinePage.getSelection());
+ }
+ }
+
+ /**
+ * This is how the framework determines which interfaces we implement.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getAdapter(Class key) {
+ if (key.equals(IContentOutlinePage.class)) {
+ return getContentOutlinePage();
+ }
+ else if (key.equals(IPropertySheetPage.class)) {
+ return getPropertySheetPage();
+ }
+ else if (key.equals(IGotoMarker.class)) {
+ return this;
+ }
+ else {
+ return super.getAdapter(key);
+ }
+ }
+
+ /**
+ * This accesses a cached version of the content outliner.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IContentOutlinePage getContentOutlinePage() {
+ if (contentOutlinePage == null) {
+ // The content outline is just a tree.
+ //
+ class MyContentOutlinePage extends ContentOutlinePage {
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ contentOutlineViewer = getTreeViewer();
+ contentOutlineViewer.addSelectionChangedListener(this);
+
+ // Set up the tree viewer.
+ //
+ contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ contentOutlineViewer.setInput(editingDomain.getResourceSet());
+
+ // Make sure our popups work.
+ //
+ createContextMenuFor(contentOutlineViewer);
+
+ if (!editingDomain.getResourceSet().getResources().isEmpty()) {
+ // Select the root object in the view.
+ //
+ ArrayList selection = new ArrayList();
+ selection.add(editingDomain.getResourceSet().getResources().get(0));
+ contentOutlineViewer.setSelection(new StructuredSelection(selection), true);
+ }
+ }
+
+ public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
+ super.makeContributions(menuManager, toolBarManager, statusLineManager);
+ contentOutlineStatusLineManager = statusLineManager;
+ }
+
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ }
+
+ contentOutlinePage = new MyContentOutlinePage();
+
+ // Listen to selection so that we can handle it is a special way.
+ //
+ contentOutlinePage.addSelectionChangedListener
+ (new ISelectionChangedListener() {
+ // This ensures that we handle selections correctly.
+ //
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleContentOutlineSelection(event.getSelection());
+ }
+ });
+ }
+
+ return contentOutlinePage;
+ }
+
+ /**
+ * This accesses a cached version of the property sheet.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IPropertySheetPage getPropertySheetPage() {
+ if (propertySheetPage == null) {
+ propertySheetPage =
+ new PropertySheetPage() {
+ public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
+ super.makeContributions(menuManager, toolBarManager, statusLineManager);
+ }
+
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ };
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
+ }
+
+ return propertySheetPage;
+ }
+
+ /**
+ * This deals with how we want selection in the outliner to affect the other views.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void handleContentOutlineSelection(ISelection selection) {
+ if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ Iterator selectedElements = ((IStructuredSelection)selection).iterator();
+ if (selectedElements.hasNext()) {
+ // Get the first selected element.
+ //
+ Object selectedElement = selectedElements.next();
+
+ // If it's the selection viewer, then we want it to select the same selection as this selection.
+ //
+ if (currentViewerPane.getViewer() == selectionViewer) {
+ ArrayList selectionList = new ArrayList();
+ selectionList.add(selectedElement);
+ while (selectedElements.hasNext()) {
+ selectionList.add(selectedElements.next());
+ }
+
+ // Set the selection to the widget.
+ //
+ selectionViewer.setSelection(new StructuredSelection(selectionList));
+ }
+ else {
+ // Set the input to the widget.
+ //
+ if (currentViewerPane.getViewer().getInput() != selectedElement) {
+ currentViewerPane.getViewer().setInput(selectedElement);
+ currentViewerPane.setTitle(selectedElement);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply tests the command stack.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isDirty() {
+ return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply saves the model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void doSave(IProgressMonitor progressMonitor) {
+ // Do the work within an operation because this is a long running activity that modifies the workbench.
+ //
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ // This is the method that gets invoked when the operation runs.
+ //
+ public void execute(IProgressMonitor monitor) {
+ try {
+ // Save the resource to the file system.
+ //
+ Resource savedResource = (Resource)editingDomain.getResourceSet().getResources().get(0);
+ savedResources.add(savedResource);
+ savedResource.save(Collections.EMPTY_MAP);
+ }
+ catch (Exception exception) {
+ EditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ try {
+ // This runs the options, and shows progress.
+ //
+ new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);
+
+ // Refresh the necessary state.
+ //
+ ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ catch (Exception exception) {
+ // Something went wrong that shouldn't.
+ //
+ EditorPlugin.INSTANCE.log(exception);
+ }
+ }
+
+ /**
+ * This always returns true because it is not currently supported.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSaveAsAllowed() {
+ return true;
+ }
+
+ /**
+ * This also changes the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void doSaveAs() {
+ SaveAsDialog saveAsDialog= new SaveAsDialog(getSite().getShell());
+ saveAsDialog.open();
+ IPath path= saveAsDialog.getResult();
+ if (path != null) {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ if (file != null) {
+ doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString()), new FileEditorInput(file));
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void doSaveAs(URI uri, IEditorInput editorInput) {
+ ((Resource)editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ setInput(editorInput);
+ setPartName(editorInput.getName());
+ IProgressMonitor progressMonitor =
+ getActionBars().getStatusLineManager() != null ?
+ getActionBars().getStatusLineManager().getProgressMonitor() :
+ new NullProgressMonitor();
+ doSave(progressMonitor);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void gotoMarker(IMarker marker) {
+ try {
+ if (marker.getType().equals(EValidator.MARKER)) {
+ String uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);
+ if (uriAttribute != null) {
+ URI uri = URI.createURI(uriAttribute);
+ EObject eObject = editingDomain.getResourceSet().getEObject(uri, true);
+ if (eObject != null) {
+ setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject)));
+ }
+ }
+ }
+ }
+ catch (CoreException exception) {
+ EditorPlugin.INSTANCE.log(exception);
+ }
+ }
+
+ /**
+ * This is called during startup.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void init(IEditorSite site, IEditorInput editorInput) {
+ setSite(site);
+ setInput(editorInput);
+ setPartName(editorInput.getName());
+ site.setSelectionProvider(this);
+ site.getPage().addPartListener(partListener);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFocus() {
+ getControl(getActivePage()).setFocus();
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionChangedListeners.add(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionChangedListeners.remove(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ISelection getSelection() {
+ return editorSelection;
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection.
+ * Calling this result will notify the listeners.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelection(ISelection selection) {
+ editorSelection = selection;
+
+ for (Iterator listeners = selectionChangedListeners.iterator(); listeners.hasNext(); ) {
+ ISelectionChangedListener listener = (ISelectionChangedListener)listeners.next();
+ listener.selectionChanged(new SelectionChangedEvent(this, selection));
+ }
+ setStatusLineManager(selection);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStatusLineManager(ISelection selection) {
+ IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?
+ contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+
+ if (statusLineManager != null) {
+ if (selection instanceof IStructuredSelection) {
+ Collection collection = ((IStructuredSelection)selection).toList();
+ switch (collection.size()) {
+ case 0: {
+ statusLineManager.setMessage(getString("_UI_NoObjectSelected"));
+ break;
+ }
+ case 1: {
+ String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
+ statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text));
+ break;
+ }
+ default: {
+ statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size())));
+ break;
+ }
+ }
+ }
+ else {
+ statusLineManager.setMessage("");
+ }
+ }
+ }
+
+ /**
+ * This looks up a string in the plugin's plugin.properties file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static String getString(String key) {
+ return EditorPlugin.INSTANCE.getString(key);
+ }
+
+ /**
+ * This looks up a string in plugin.properties, making a substitution.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static String getString(String key, Object s1) {
+ return EditorPlugin.INSTANCE.getString(key, new Object [] { s1 });
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void menuAboutToShow(IMenuManager menuManager) {
+ ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditingDomainActionBarContributor getActionBarContributor() {
+ return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IActionBars getActionBars() {
+ return getActionBarContributor().getActionBars();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AdapterFactory getAdapterFactory() {
+ return adapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
+
+ getSite().getPage().removePartListener(partListener);
+
+ adapterFactory.dispose();
+
+ if (getActionBarContributor().getActiveEditor() == this) {
+ getActionBarContributor().setActiveEditor(null);
+ }
+
+ if (propertySheetPage != null) {
+ propertySheetPage.dispose();
+ }
+
+ if (contentOutlinePage != null) {
+ contentOutlinePage.dispose();
+ }
+
+ super.dispose();
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenModelWizard.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenModelWizard.java
new file mode 100644
index 000000000..9d9da5d57
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/presentation/GMFGenModelWizard.java
@@ -0,0 +1,615 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.presentation;
+
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.StringTokenizer;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.ModifyEvent;
+
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.ISetSelectionTarget;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenFactory;
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+
+import org.eclipse.core.runtime.Path;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+
+
+/**
+ * This is a simple wizard for creating a new model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GMFGenModelWizard extends Wizard implements INewWizard {
+ /**
+ * This caches an instance of the model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GMFGenPackage gmfGenPackage = GMFGenPackage.eINSTANCE;
+
+ /**
+ * This caches an instance of the model factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GMFGenFactory gmfGenFactory = gmfGenPackage.getGMFGenFactory();
+
+ /**
+ * This is the file creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GMFGenModelWizardNewFileCreationPage newFileCreationPage;
+
+ /**
+ * This is the initial object creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GMFGenModelWizardInitialObjectCreationPage initialObjectCreationPage;
+
+ /**
+ * Remember the selection during initialization for populating the default container.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IStructuredSelection selection;
+
+ /**
+ * Remember the workbench during initialization.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IWorkbench workbench;
+
+ /**
+ * Caches the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List initialObjectNames;
+
+ /**
+ * This just records the information.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
+ this.selection = selection;
+ setWindowTitle(EditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
+ setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(EditorPlugin.INSTANCE.getImage("full/wizban/NewGMFGen")));
+ }
+
+ /**
+ * Returns the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection getInitialObjectNames() {
+ if (initialObjectNames == null) {
+ initialObjectNames = new ArrayList();
+ for (Iterator classifiers = gmfGenPackage.getEClassifiers().iterator(); classifiers.hasNext(); ) {
+ EClassifier eClassifier = (EClassifier)classifiers.next();
+ if (eClassifier instanceof EClass) {
+ EClass eClass = (EClass)eClassifier;
+ if (!eClass.isAbstract()) {
+ initialObjectNames.add(eClass.getName());
+ }
+ }
+ }
+ Collections.sort(initialObjectNames, java.text.Collator.getInstance());
+ }
+ return initialObjectNames;
+ }
+
+ /**
+ * Create a new model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EObject createInitialModel() {
+ EClass eClass = (EClass)gmfGenPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
+ EObject rootObject = gmfGenFactory.create(eClass);
+ return rootObject;
+ }
+
+ /**
+ * Do the work after everything is specified.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean performFinish() {
+ try {
+ // Remember the file.
+ //
+ final IFile modelFile = getModelFile();
+
+ // Do the work within an operation.
+ //
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ protected void execute(IProgressMonitor progressMonitor) {
+ try {
+ // Create a resource set
+ //
+ ResourceSet resourceSet = new ResourceSetImpl();
+
+ // Get the URI of the model file.
+ //
+ URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString());
+
+ // Create a resource for this file.
+ //
+ Resource resource = resourceSet.createResource(fileURI);
+
+ // Add the initial model object to the contents.
+ //
+ EObject rootObject = createInitialModel();
+ if (rootObject != null) {
+ resource.getContents().add(rootObject);
+ }
+
+ // Save the contents of the resource to the file system.
+ //
+ Map options = new HashMap();
+ options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
+ resource.save(options);
+ }
+ catch (Exception exception) {
+ EditorPlugin.INSTANCE.log(exception);
+ }
+ finally {
+ progressMonitor.done();
+ }
+ }
+ };
+
+ getContainer().run(false, false, operation);
+
+ // Select the new file resource in the current view.
+ //
+ IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbenchWindow.getActivePage();
+ final IWorkbenchPart activePart = page.getActivePart();
+ if (activePart instanceof ISetSelectionTarget) {
+ final ISelection targetSelection = new StructuredSelection(modelFile);
+ getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ ((ISetSelectionTarget)activePart).selectReveal(targetSelection);
+ }
+ });
+ }
+
+ // Open an editor on the new file.
+ //
+ try {
+ page.openEditor
+ (new FileEditorInput(modelFile),
+ workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
+ }
+ catch (PartInitException exception) {
+ MessageDialog.openError(workbenchWindow.getShell(), EditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage());
+ return false;
+ }
+
+ return true;
+ }
+ catch (Exception exception) {
+ EditorPlugin.INSTANCE.log(exception);
+ return false;
+ }
+ }
+
+ /**
+ * This is the one page of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class GMFGenModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GMFGenModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) {
+ super(pageId, selection);
+ }
+
+ /**
+ * The framework calls this to see if the file is correct.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean validatePage() {
+ if (super.validatePage()) {
+ // Make sure the file ends in ".gmfgen".
+ //
+ String requiredExt = EditorPlugin.INSTANCE.getString("_UI_GMFGenEditorFilenameExtension");
+ String enteredExt = new Path(getFileName()).getFileExtension();
+ if (enteredExt == null || !enteredExt.equals(requiredExt)) {
+ setErrorMessage(EditorPlugin.INSTANCE.getString("_WARN_FilenameExtension", new Object [] { requiredExt }));
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+ else {
+ return false;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IFile getModelFile() {
+ return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName()));
+ }
+ }
+
+ /**
+ * This is the page where the type of object to create is selected.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class GMFGenModelWizardInitialObjectCreationPage extends WizardPage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Combo initialObjectField;
+
+ /**
+ * @generated
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ protected List encodings;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Combo encodingField;
+
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GMFGenModelWizardInitialObjectCreationPage(String pageId) {
+ super(pageId);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ {
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 1;
+ layout.verticalSpacing = 12;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.grabExcessVerticalSpace = true;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+ }
+
+ Label containerLabel = new Label(composite, SWT.LEFT);
+ {
+ containerLabel.setText(EditorPlugin.INSTANCE.getString("_UI_ModelObject"));
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ containerLabel.setLayoutData(data);
+ }
+
+ initialObjectField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ initialObjectField.setLayoutData(data);
+ }
+
+ for (Iterator i = getInitialObjectNames().iterator(); i.hasNext(); ) {
+ initialObjectField.add(getLabel((String)i.next()));
+ }
+
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.select(0);
+ }
+ initialObjectField.addModifyListener(validator);
+
+ Label encodingLabel = new Label(composite, SWT.LEFT);
+ {
+ encodingLabel.setText(EditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ encodingLabel.setLayoutData(data);
+ }
+ encodingField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ encodingField.setLayoutData(data);
+ }
+
+ for (Iterator i = getEncodings().iterator(); i.hasNext(); ) {
+ encodingField.add((String)i.next());
+ }
+
+ encodingField.select(0);
+ encodingField.addModifyListener(validator);
+
+ setPageComplete(validatePage());
+ setControl(composite);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModifyListener validator =
+ new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ setPageComplete(validatePage());
+ }
+ };
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean validatePage() {
+ return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setVisible(boolean visible) {
+ super.setVisible(visible);
+ if (visible) {
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.clearSelection();
+ encodingField.setFocus();
+ }
+ else {
+ encodingField.clearSelection();
+ initialObjectField.setFocus();
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getInitialObjectName() {
+ String label = initialObjectField.getText();
+
+ for (Iterator i = getInitialObjectNames().iterator(); i.hasNext(); ) {
+ String name = (String)i.next();
+ if (getLabel(name).equals(label)) {
+ return name;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getEncoding() {
+ return encodingField.getText();
+ }
+
+ /**
+ * Returns the label for the specified type name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected String getLabel(String typeName) {
+ try {
+ return EditorPlugin.INSTANCE.getString("_UI_" + typeName + "_type");
+ }
+ catch(MissingResourceException mre) {
+ EditorPlugin.INSTANCE.log(mre);
+ }
+ return typeName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection getEncodings() {
+ if (encodings == null) {
+ encodings = new ArrayList();
+ for (StringTokenizer stringTokenizer = new StringTokenizer(EditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) {
+ encodings.add(stringTokenizer.nextToken());
+ }
+ }
+ return encodings;
+ }
+ }
+
+ /**
+ * The framework calls this to create the contents of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addPages() {
+ // Create a page, set the title, and the initial model file name.
+ //
+ newFileCreationPage = new GMFGenModelWizardNewFileCreationPage("Whatever", selection);
+ newFileCreationPage.setTitle(EditorPlugin.INSTANCE.getString("_UI_GMFGenModelWizard_label"));
+ newFileCreationPage.setDescription(EditorPlugin.INSTANCE.getString("_UI_GMFGenModelWizard_description"));
+ newFileCreationPage.setFileName(EditorPlugin.INSTANCE.getString("_UI_GMFGenEditorFilenameDefaultBase") + "." + EditorPlugin.INSTANCE.getString("_UI_GMFGenEditorFilenameExtension"));
+ addPage(newFileCreationPage);
+
+ // Try and get the resource selection to determine a current directory for the file dialog.
+ //
+ if (selection != null && !selection.isEmpty()) {
+ // Get the resource...
+ //
+ Object selectedElement = selection.iterator().next();
+ if (selectedElement instanceof IResource) {
+ // Get the resource parent, if its a file.
+ //
+ IResource selectedResource = (IResource)selectedElement;
+ if (selectedResource.getType() == IResource.FILE) {
+ selectedResource = selectedResource.getParent();
+ }
+
+ // This gives us a directory...
+ //
+ if (selectedResource instanceof IFolder || selectedResource instanceof IProject) {
+ // Set this for the container.
+ //
+ newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());
+
+ // Make up a unique new name here.
+ //
+ String defaultModelBaseFilename = EditorPlugin.INSTANCE.getString("_UI_GMFGenEditorFilenameDefaultBase");
+ String defaultModelFilenameExtension = EditorPlugin.INSTANCE.getString("_UI_GMFGenEditorFilenameExtension");
+ String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension;
+ for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) {
+ modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension;
+ }
+ newFileCreationPage.setFileName(modelFilename);
+ }
+ }
+ }
+ initialObjectCreationPage = new GMFGenModelWizardInitialObjectCreationPage("Whatever2");
+ initialObjectCreationPage.setTitle(EditorPlugin.INSTANCE.getString("_UI_GMFGenModelWizard_label"));
+ initialObjectCreationPage.setDescription(EditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description"));
+ addPage(initialObjectCreationPage);
+ }
+
+ /**
+ * Get the file from the page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IFile getModelFile() {
+ return newFileCreationPage.getModelFile();
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/EntryBaseItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/EntryBaseItemProvider.java
new file mode 100644
index 000000000..7a3086154
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/EntryBaseItemProvider.java
@@ -0,0 +1,230 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.codegen.gmfgen.EntryBase;
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.EntryBase} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EntryBaseItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EntryBaseItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addOrderPropertyDescriptor(object);
+ addTitleKeyPropertyDescriptor(object);
+ addDescriptionKeyPropertyDescriptor(object);
+ addLargeIconPathPropertyDescriptor(object);
+ addSmallIconPathPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Order feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addOrderPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_EntryBase_order_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_EntryBase_order_feature", "_UI_EntryBase_type"),
+ GMFGenPackage.eINSTANCE.getEntryBase_Order(),
+ true,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Title Key feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTitleKeyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_EntryBase_titleKey_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_EntryBase_titleKey_feature", "_UI_EntryBase_type"),
+ GMFGenPackage.eINSTANCE.getEntryBase_TitleKey(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Description Key feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDescriptionKeyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_EntryBase_descriptionKey_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_EntryBase_descriptionKey_feature", "_UI_EntryBase_type"),
+ GMFGenPackage.eINSTANCE.getEntryBase_DescriptionKey(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Large Icon Path feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLargeIconPathPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_EntryBase_largeIconPath_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_EntryBase_largeIconPath_feature", "_UI_EntryBase_type"),
+ GMFGenPackage.eINSTANCE.getEntryBase_LargeIconPath(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Small Icon Path feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addSmallIconPathPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_EntryBase_smallIconPath_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_EntryBase_smallIconPath_feature", "_UI_EntryBase_type"),
+ GMFGenPackage.eINSTANCE.getEntryBase_SmallIconPath(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ EntryBase entryBase = (EntryBase)object;
+ return getString("_UI_EntryBase_type") + " " + entryBase.getOrder();
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(EntryBase.class)) {
+ case GMFGenPackage.ENTRY_BASE__ORDER:
+ case GMFGenPackage.ENTRY_BASE__TITLE_KEY:
+ case GMFGenPackage.ENTRY_BASE__DESCRIPTION_KEY:
+ case GMFGenPackage.ENTRY_BASE__LARGE_ICON_PATH:
+ case GMFGenPackage.ENTRY_BASE__SMALL_ICON_PATH:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java
new file mode 100644
index 000000000..e5b0a18cc
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java
@@ -0,0 +1,406 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.gmf.codegen.gmfgen.util.GMFGenAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GMFGenItemProviderAdapterFactory extends GMFGenAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection supportedTypes = new ArrayList();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GMFGenItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.GenDiagram} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GenDiagramItemProvider genDiagramItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenDiagram}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createGenDiagramAdapter() {
+ if (genDiagramItemProvider == null) {
+ genDiagramItemProvider = new GenDiagramItemProvider(this);
+ }
+
+ return genDiagramItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.GenNode} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GenNodeItemProvider genNodeItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenNode}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createGenNodeAdapter() {
+ if (genNodeItemProvider == null) {
+ genNodeItemProvider = new GenNodeItemProvider(this);
+ }
+
+ return genNodeItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.GenChildNode} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GenChildNodeItemProvider genChildNodeItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenChildNode}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createGenChildNodeAdapter() {
+ if (genChildNodeItemProvider == null) {
+ genChildNodeItemProvider = new GenChildNodeItemProvider(this);
+ }
+
+ return genChildNodeItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GenChildContainerItemProvider genChildContainerItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createGenChildContainerAdapter() {
+ if (genChildContainerItemProvider == null) {
+ genChildContainerItemProvider = new GenChildContainerItemProvider(this);
+ }
+
+ return genChildContainerItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.GenLinkWithClass} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GenLinkWithClassItemProvider genLinkWithClassItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenLinkWithClass}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createGenLinkWithClassAdapter() {
+ if (genLinkWithClassItemProvider == null) {
+ genLinkWithClassItemProvider = new GenLinkWithClassItemProvider(this);
+ }
+
+ return genLinkWithClassItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.GenLinkReferenceOnly} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GenLinkReferenceOnlyItemProvider genLinkReferenceOnlyItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenLinkReferenceOnly}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createGenLinkReferenceOnlyAdapter() {
+ if (genLinkReferenceOnlyItemProvider == null) {
+ genLinkReferenceOnlyItemProvider = new GenLinkReferenceOnlyItemProvider(this);
+ }
+
+ return genLinkReferenceOnlyItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.Palette} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PaletteItemProvider paletteItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.Palette}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createPaletteAdapter() {
+ if (paletteItemProvider == null) {
+ paletteItemProvider = new PaletteItemProvider(this);
+ }
+
+ return paletteItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.NodeEntry} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NodeEntryItemProvider nodeEntryItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.NodeEntry}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createNodeEntryAdapter() {
+ if (nodeEntryItemProvider == null) {
+ nodeEntryItemProvider = new NodeEntryItemProvider(this);
+ }
+
+ return nodeEntryItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.LinkEntry} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected LinkEntryItemProvider linkEntryItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.LinkEntry}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createLinkEntryAdapter() {
+ if (linkEntryItemProvider == null) {
+ linkEntryItemProvider = new LinkEntryItemProvider(this);
+ }
+
+ return linkEntryItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.ToolGroup} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ToolGroupItemProvider toolGroupItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.ToolGroup}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createToolGroupAdapter() {
+ if (toolGroupItemProvider == null) {
+ toolGroupItemProvider = new ToolGroupItemProvider(this);
+ }
+
+ return toolGroupItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (genDiagramItemProvider != null) genDiagramItemProvider.dispose();
+ if (genNodeItemProvider != null) genNodeItemProvider.dispose();
+ if (genChildNodeItemProvider != null) genChildNodeItemProvider.dispose();
+ if (genChildContainerItemProvider != null) genChildContainerItemProvider.dispose();
+ if (genLinkWithClassItemProvider != null) genLinkWithClassItemProvider.dispose();
+ if (genLinkReferenceOnlyItemProvider != null) genLinkReferenceOnlyItemProvider.dispose();
+ if (paletteItemProvider != null) paletteItemProvider.dispose();
+ if (nodeEntryItemProvider != null) nodeEntryItemProvider.dispose();
+ if (linkEntryItemProvider != null) linkEntryItemProvider.dispose();
+ if (toolGroupItemProvider != null) toolGroupItemProvider.dispose();
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenBaseElementItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenBaseElementItemProvider.java
new file mode 100644
index 000000000..030632108
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenBaseElementItemProvider.java
@@ -0,0 +1,185 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.GenBaseElement;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenBaseElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GenBaseElementItemProvider
+ extends GenCommonBaseItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenBaseElementItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDomainNameFeaturePropertyDescriptor(object);
+ addForegroundColorPropertyDescriptor(object);
+ addContainmentMetaFeaturePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Domain Name Feature feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDomainNameFeaturePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenBaseElement_domainNameFeature_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenBaseElement_domainNameFeature_feature", "_UI_GenBaseElement_type"),
+ GMFGenPackage.eINSTANCE.getGenBaseElement_DomainNameFeature(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Foreground Color feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addForegroundColorPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenBaseElement_foregroundColor_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenBaseElement_foregroundColor_feature", "_UI_GenBaseElement_type"),
+ GMFGenPackage.eINSTANCE.getGenBaseElement_ForegroundColor(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Containment Meta Feature feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addContainmentMetaFeaturePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenBaseElement_containmentMetaFeature_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenBaseElement_containmentMetaFeature_feature", "_UI_GenBaseElement_type"),
+ GMFGenPackage.eINSTANCE.getGenBaseElement_ContainmentMetaFeature(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((GenBaseElement)object).getEditPartClassName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_GenBaseElement_type") :
+ getString("_UI_GenBaseElement_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(GenBaseElement.class)) {
+ case GMFGenPackage.GEN_BASE_ELEMENT__FOREGROUND_COLOR:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenChildContainerItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenChildContainerItemProvider.java
new file mode 100644
index 000000000..8a969a6fd
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenChildContainerItemProvider.java
@@ -0,0 +1,264 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.GenChildContainer;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GenChildContainerItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenChildContainerItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addGroupIDPropertyDescriptor(object);
+ addTitleKeyPropertyDescriptor(object);
+ addCanCollapsePropertyDescriptor(object);
+ addHideIfEmptyPropertyDescriptor(object);
+ addNeedsTitlePropertyDescriptor(object);
+ addLayoutKindPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Group ID feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addGroupIDPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenChildContainer_groupID_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenChildContainer_groupID_feature", "_UI_GenChildContainer_type"),
+ GMFGenPackage.eINSTANCE.getGenChildContainer_GroupID(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Title Key feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTitleKeyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenChildContainer_titleKey_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenChildContainer_titleKey_feature", "_UI_GenChildContainer_type"),
+ GMFGenPackage.eINSTANCE.getGenChildContainer_TitleKey(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Can Collapse feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCanCollapsePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenChildContainer_canCollapse_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenChildContainer_canCollapse_feature", "_UI_GenChildContainer_type"),
+ GMFGenPackage.eINSTANCE.getGenChildContainer_CanCollapse(),
+ true,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Hide If Empty feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addHideIfEmptyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenChildContainer_hideIfEmpty_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenChildContainer_hideIfEmpty_feature", "_UI_GenChildContainer_type"),
+ GMFGenPackage.eINSTANCE.getGenChildContainer_HideIfEmpty(),
+ true,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Needs Title feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNeedsTitlePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenChildContainer_needsTitle_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenChildContainer_needsTitle_feature", "_UI_GenChildContainer_type"),
+ GMFGenPackage.eINSTANCE.getGenChildContainer_NeedsTitle(),
+ true,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Layout Kind feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLayoutKindPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenChildContainer_layoutKind_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenChildContainer_layoutKind_feature", "_UI_GenChildContainer_type"),
+ GMFGenPackage.eINSTANCE.getGenChildContainer_LayoutKind(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns GenChildContainer.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/GenChildContainer");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((GenChildContainer)object).getGroupID();
+ return label == null || label.length() == 0 ?
+ getString("_UI_GenChildContainer_type") :
+ getString("_UI_GenChildContainer_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(GenChildContainer.class)) {
+ case GMFGenPackage.GEN_CHILD_CONTAINER__GROUP_ID:
+ case GMFGenPackage.GEN_CHILD_CONTAINER__TITLE_KEY:
+ case GMFGenPackage.GEN_CHILD_CONTAINER__CAN_COLLAPSE:
+ case GMFGenPackage.GEN_CHILD_CONTAINER__HIDE_IF_EMPTY:
+ case GMFGenPackage.GEN_CHILD_CONTAINER__NEEDS_TITLE:
+ case GMFGenPackage.GEN_CHILD_CONTAINER__LAYOUT_KIND:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenChildNodeItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenChildNodeItemProvider.java
new file mode 100644
index 000000000..d15913f88
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenChildNodeItemProvider.java
@@ -0,0 +1,174 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.GenChildNode;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenChildNode} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GenChildNodeItemProvider
+ extends GenNodeItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenChildNodeItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addGroupIDPropertyDescriptor(object);
+ addChildMetaFeaturePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Group ID feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addGroupIDPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenChildNode_groupID_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenChildNode_groupID_feature", "_UI_GenChildNode_type"),
+ GMFGenPackage.eINSTANCE.getGenChildNode_GroupID(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Child Meta Feature feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addChildMetaFeaturePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenChildNode_childMetaFeature_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenChildNode_childMetaFeature_feature", "_UI_GenChildNode_type"),
+ GMFGenPackage.eINSTANCE.getGenChildNode_ChildMetaFeature(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns GenChildNode.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/GenChildNode");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((GenChildNode)object).getEditPartClassName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_GenChildNode_type") :
+ getString("_UI_GenChildNode_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(GenChildNode.class)) {
+ case GMFGenPackage.GEN_CHILD_NODE__GROUP_ID:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenCommonBaseItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenCommonBaseItemProvider.java
new file mode 100644
index 000000000..d600cc3e8
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenCommonBaseItemProvider.java
@@ -0,0 +1,209 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.GenCommonBase;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GenCommonBaseItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenCommonBaseItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDiagramRunTimeClassPropertyDescriptor(object);
+ addVisualIDPropertyDescriptor(object);
+ addEditPartClassNamePropertyDescriptor(object);
+ addMetaInfoProviderClassNamePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Diagram Run Time Class feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDiagramRunTimeClassPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenCommonBase_diagramRunTimeClass_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenCommonBase_diagramRunTimeClass_feature", "_UI_GenCommonBase_type"),
+ GMFGenPackage.eINSTANCE.getGenCommonBase_DiagramRunTimeClass(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Visual ID feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addVisualIDPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenCommonBase_visualID_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenCommonBase_visualID_feature", "_UI_GenCommonBase_type"),
+ GMFGenPackage.eINSTANCE.getGenCommonBase_VisualID(),
+ true,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Edit Part Class Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addEditPartClassNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenCommonBase_editPartClassName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenCommonBase_editPartClassName_feature", "_UI_GenCommonBase_type"),
+ GMFGenPackage.eINSTANCE.getGenCommonBase_EditPartClassName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Meta Info Provider Class Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addMetaInfoProviderClassNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenCommonBase_metaInfoProviderClassName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenCommonBase_metaInfoProviderClassName_feature", "_UI_GenCommonBase_type"),
+ GMFGenPackage.eINSTANCE.getGenCommonBase_MetaInfoProviderClassName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((GenCommonBase)object).getEditPartClassName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_GenCommonBase_type") :
+ getString("_UI_GenCommonBase_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(GenCommonBase.class)) {
+ case GMFGenPackage.GEN_COMMON_BASE__VISUAL_ID:
+ case GMFGenPackage.GEN_COMMON_BASE__EDIT_PART_CLASS_NAME:
+ case GMFGenPackage.GEN_COMMON_BASE__META_INFO_PROVIDER_CLASS_NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenDiagramItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenDiagramItemProvider.java
new file mode 100644
index 000000000..13b03525b
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenDiagramItemProvider.java
@@ -0,0 +1,565 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenFactory;
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.GenDiagram;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenDiagram} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GenDiagramItemProvider
+ extends GenCommonBaseItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenDiagramItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDomainMetaModelPropertyDescriptor(object);
+ addEmfGenModelPropertyDescriptor(object);
+ addDomainDiagramElementPropertyDescriptor(object);
+ addEditPartsPackageNamePropertyDescriptor(object);
+ addCommandsPackageNamePropertyDescriptor(object);
+ addEditProvidersPackageNamePropertyDescriptor(object);
+ addPluginNamePropertyDescriptor(object);
+ addProviderNamePropertyDescriptor(object);
+ addPluginIDPropertyDescriptor(object);
+ addPluginClassNamePropertyDescriptor(object);
+ addEditorPackageNamePropertyDescriptor(object);
+ addEditorClassNamePropertyDescriptor(object);
+ addEditPartFactoryClassNamePropertyDescriptor(object);
+ addMetaInfoFactoryClassNamePropertyDescriptor(object);
+ addHasDomainModelPropertyDescriptor(object);
+ addDiagramFileExtensionPropertyDescriptor(object);
+ addSameFileForDiagramAndModelPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Domain Meta Model feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDomainMetaModelPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_domainMetaModel_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_domainMetaModel_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_DomainMetaModel(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Emf Gen Model feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addEmfGenModelPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_emfGenModel_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_emfGenModel_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_EmfGenModel(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Domain Diagram Element feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDomainDiagramElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_domainDiagramElement_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_domainDiagramElement_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_DomainDiagramElement(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Edit Parts Package Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addEditPartsPackageNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_editPartsPackageName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_editPartsPackageName_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_EditPartsPackageName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Commands Package Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCommandsPackageNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_commandsPackageName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_commandsPackageName_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_CommandsPackageName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Edit Providers Package Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addEditProvidersPackageNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_editProvidersPackageName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_editProvidersPackageName_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_EditProvidersPackageName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Plugin Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPluginNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_pluginName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_pluginName_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_PluginName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Provider Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addProviderNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_providerName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_providerName_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_ProviderName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Plugin ID feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPluginIDPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_pluginID_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_pluginID_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_PluginID(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Plugin Class Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPluginClassNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_pluginClassName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_pluginClassName_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_PluginClassName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Editor Package Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addEditorPackageNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_editorPackageName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_editorPackageName_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_EditorPackageName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Editor Class Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addEditorClassNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_editorClassName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_editorClassName_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_EditorClassName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Edit Part Factory Class Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addEditPartFactoryClassNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_editPartFactoryClassName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_editPartFactoryClassName_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_EditPartFactoryClassName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Meta Info Factory Class Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addMetaInfoFactoryClassNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_metaInfoFactoryClassName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_metaInfoFactoryClassName_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_MetaInfoFactoryClassName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Has Domain Model feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addHasDomainModelPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_hasDomainModel_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_hasDomainModel_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_HasDomainModel(),
+ true,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Diagram File Extension feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDiagramFileExtensionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_diagramFileExtension_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_diagramFileExtension_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_DiagramFileExtension(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Same File For Diagram And Model feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addSameFileForDiagramAndModelPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenDiagram_sameFileForDiagramAndModel_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenDiagram_sameFileForDiagramAndModel_feature", "_UI_GenDiagram_type"),
+ GMFGenPackage.eINSTANCE.getGenDiagram_SameFileForDiagramAndModel(),
+ true,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(GMFGenPackage.eINSTANCE.getGenDiagram_Nodes());
+ childrenFeatures.add(GMFGenPackage.eINSTANCE.getGenDiagram_Links());
+ childrenFeatures.add(GMFGenPackage.eINSTANCE.getGenDiagram_Palette());
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns GenDiagram.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/GenDiagram");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((GenDiagram)object).getEditPartClassName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_GenDiagram_type") :
+ getString("_UI_GenDiagram_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(GenDiagram.class)) {
+ case GMFGenPackage.GEN_DIAGRAM__EDIT_PARTS_PACKAGE_NAME:
+ case GMFGenPackage.GEN_DIAGRAM__COMMANDS_PACKAGE_NAME:
+ case GMFGenPackage.GEN_DIAGRAM__EDIT_PROVIDERS_PACKAGE_NAME:
+ case GMFGenPackage.GEN_DIAGRAM__PLUGIN_NAME:
+ case GMFGenPackage.GEN_DIAGRAM__PROVIDER_NAME:
+ case GMFGenPackage.GEN_DIAGRAM__PLUGIN_ID:
+ case GMFGenPackage.GEN_DIAGRAM__PLUGIN_CLASS_NAME:
+ case GMFGenPackage.GEN_DIAGRAM__EDITOR_PACKAGE_NAME:
+ case GMFGenPackage.GEN_DIAGRAM__EDITOR_CLASS_NAME:
+ case GMFGenPackage.GEN_DIAGRAM__EDIT_PART_FACTORY_CLASS_NAME:
+ case GMFGenPackage.GEN_DIAGRAM__META_INFO_FACTORY_CLASS_NAME:
+ case GMFGenPackage.GEN_DIAGRAM__HAS_DOMAIN_MODEL:
+ case GMFGenPackage.GEN_DIAGRAM__DIAGRAM_FILE_EXTENSION:
+ case GMFGenPackage.GEN_DIAGRAM__SAME_FILE_FOR_DIAGRAM_AND_MODEL:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case GMFGenPackage.GEN_DIAGRAM__NODES:
+ case GMFGenPackage.GEN_DIAGRAM__LINKS:
+ case GMFGenPackage.GEN_DIAGRAM__PALETTE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getGenDiagram_Nodes(),
+ GMFGenFactory.eINSTANCE.createGenNode()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getGenDiagram_Nodes(),
+ GMFGenFactory.eINSTANCE.createGenChildNode()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getGenDiagram_Links(),
+ GMFGenFactory.eINSTANCE.createGenLinkWithClass()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getGenDiagram_Links(),
+ GMFGenFactory.eINSTANCE.createGenLinkReferenceOnly()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getGenDiagram_Palette(),
+ GMFGenFactory.eINSTANCE.createPalette()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenLinkItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenLinkItemProvider.java
new file mode 100644
index 000000000..1d2da83cb
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenLinkItemProvider.java
@@ -0,0 +1,230 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.GenLink;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenLink} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GenLinkItemProvider
+ extends GenBaseElementItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenLinkItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDomainLinkTargetFeaturePropertyDescriptor(object);
+ addLineStylePropertyDescriptor(object);
+ addFigureQualifiedClassNamePropertyDescriptor(object);
+ addSourceDecorationFigureQualifiedClassNamePropertyDescriptor(object);
+ addTargetDecorationFigureQualifiedClassNamePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Domain Link Target Feature feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDomainLinkTargetFeaturePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenLink_domainLinkTargetFeature_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenLink_domainLinkTargetFeature_feature", "_UI_GenLink_type"),
+ GMFGenPackage.eINSTANCE.getGenLink_DomainLinkTargetFeature(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Line Style feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLineStylePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenLink_lineStyle_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenLink_lineStyle_feature", "_UI_GenLink_type"),
+ GMFGenPackage.eINSTANCE.getGenLink_LineStyle(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Figure Qualified Class Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addFigureQualifiedClassNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenLink_figureQualifiedClassName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenLink_figureQualifiedClassName_feature", "_UI_GenLink_type"),
+ GMFGenPackage.eINSTANCE.getGenLink_FigureQualifiedClassName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Source Decoration Figure Qualified Class Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addSourceDecorationFigureQualifiedClassNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenLink_sourceDecorationFigureQualifiedClassName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenLink_sourceDecorationFigureQualifiedClassName_feature", "_UI_GenLink_type"),
+ GMFGenPackage.eINSTANCE.getGenLink_SourceDecorationFigureQualifiedClassName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Target Decoration Figure Qualified Class Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTargetDecorationFigureQualifiedClassNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenLink_targetDecorationFigureQualifiedClassName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenLink_targetDecorationFigureQualifiedClassName_feature", "_UI_GenLink_type"),
+ GMFGenPackage.eINSTANCE.getGenLink_TargetDecorationFigureQualifiedClassName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((GenLink)object).getEditPartClassName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_GenLink_type") :
+ getString("_UI_GenLink_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(GenLink.class)) {
+ case GMFGenPackage.GEN_LINK__LINE_STYLE:
+ case GMFGenPackage.GEN_LINK__FIGURE_QUALIFIED_CLASS_NAME:
+ case GMFGenPackage.GEN_LINK__SOURCE_DECORATION_FIGURE_QUALIFIED_CLASS_NAME:
+ case GMFGenPackage.GEN_LINK__TARGET_DECORATION_FIGURE_QUALIFIED_CLASS_NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenLinkReferenceOnlyItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenLinkReferenceOnlyItemProvider.java
new file mode 100644
index 000000000..d61613dd4
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenLinkReferenceOnlyItemProvider.java
@@ -0,0 +1,122 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.gmf.codegen.gmfgen.GenLinkReferenceOnly;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenLinkReferenceOnly} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GenLinkReferenceOnlyItemProvider
+ extends GenLinkItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenLinkReferenceOnlyItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns GenLinkReferenceOnly.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/GenLinkReferenceOnly");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((GenLinkReferenceOnly)object).getEditPartClassName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_GenLinkReferenceOnly_type") :
+ getString("_UI_GenLinkReferenceOnly_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenLinkWithClassItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenLinkWithClassItemProvider.java
new file mode 100644
index 000000000..74a7a547d
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenLinkWithClassItemProvider.java
@@ -0,0 +1,166 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.GenLinkWithClass;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenLinkWithClass} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GenLinkWithClassItemProvider
+ extends GenLinkItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenLinkWithClassItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDomainMetaClassPropertyDescriptor(object);
+ addLinkContainerFeaturePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Domain Meta Class feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDomainMetaClassPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenLinkWithClass_domainMetaClass_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenLinkWithClass_domainMetaClass_feature", "_UI_GenLinkWithClass_type"),
+ GMFGenPackage.eINSTANCE.getGenLinkWithClass_DomainMetaClass(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Link Container Feature feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addLinkContainerFeaturePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenLinkWithClass_linkContainerFeature_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenLinkWithClass_linkContainerFeature_feature", "_UI_GenLinkWithClass_type"),
+ GMFGenPackage.eINSTANCE.getGenLinkWithClass_LinkContainerFeature(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns GenLinkWithClass.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/GenLinkWithClass");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((GenLinkWithClass)object).getEditPartClassName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_GenLinkWithClass_type") :
+ getString("_UI_GenLinkWithClass_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenNodeItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenNodeItemProvider.java
new file mode 100644
index 000000000..50a15b5f9
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GenNodeItemProvider.java
@@ -0,0 +1,330 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenFactory;
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.GenNode;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.GenNode} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GenNodeItemProvider
+ extends GenBaseElementItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenNodeItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDomainMetaClassPropertyDescriptor(object);
+ addViewmapURIPropertyDescriptor(object);
+ addNodeVisualizationKindPropertyDescriptor(object);
+ addViewmapClassPropertyDescriptor(object);
+ addAffixedStereotypesPropertyDescriptor(object);
+ addBackgroundColorPropertyDescriptor(object);
+ addChildContainersPlacementPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Domain Meta Class feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDomainMetaClassPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenNode_domainMetaClass_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenNode_domainMetaClass_feature", "_UI_GenNode_type"),
+ GMFGenPackage.eINSTANCE.getGenNode_DomainMetaClass(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Viewmap URI feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addViewmapURIPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenNode_viewmapURI_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenNode_viewmapURI_feature", "_UI_GenNode_type"),
+ GMFGenPackage.eINSTANCE.getGenNode_ViewmapURI(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Node Visualization Kind feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNodeVisualizationKindPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenNode_nodeVisualizationKind_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenNode_nodeVisualizationKind_feature", "_UI_GenNode_type"),
+ GMFGenPackage.eINSTANCE.getGenNode_NodeVisualizationKind(),
+ true,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Viewmap Class feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addViewmapClassPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenNode_viewmapClass_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenNode_viewmapClass_feature", "_UI_GenNode_type"),
+ GMFGenPackage.eINSTANCE.getGenNode_ViewmapClass(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Affixed Stereotypes feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAffixedStereotypesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenNode_affixedStereotypes_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenNode_affixedStereotypes_feature", "_UI_GenNode_type"),
+ GMFGenPackage.eINSTANCE.getGenNode_AffixedStereotypes(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Background Color feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addBackgroundColorPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenNode_backgroundColor_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenNode_backgroundColor_feature", "_UI_GenNode_type"),
+ GMFGenPackage.eINSTANCE.getGenNode_BackgroundColor(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Child Containers Placement feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addChildContainersPlacementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_GenNode_childContainersPlacement_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_GenNode_childContainersPlacement_feature", "_UI_GenNode_type"),
+ GMFGenPackage.eINSTANCE.getGenNode_ChildContainersPlacement(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(GMFGenPackage.eINSTANCE.getGenNode_ChildContainers());
+ childrenFeatures.add(GMFGenPackage.eINSTANCE.getGenNode_ChildNodes());
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns GenNode.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/GenNode");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((GenNode)object).getEditPartClassName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_GenNode_type") :
+ getString("_UI_GenNode_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(GenNode.class)) {
+ case GMFGenPackage.GEN_NODE__VIEWMAP_URI:
+ case GMFGenPackage.GEN_NODE__NODE_VISUALIZATION_KIND:
+ case GMFGenPackage.GEN_NODE__VIEWMAP_CLASS:
+ case GMFGenPackage.GEN_NODE__AFFIXED_STEREOTYPES:
+ case GMFGenPackage.GEN_NODE__BACKGROUND_COLOR:
+ case GMFGenPackage.GEN_NODE__CHILD_CONTAINERS_PLACEMENT:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case GMFGenPackage.GEN_NODE__CHILD_CONTAINERS:
+ case GMFGenPackage.GEN_NODE__CHILD_NODES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getGenNode_ChildContainers(),
+ GMFGenFactory.eINSTANCE.createGenChildContainer()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getGenNode_ChildNodes(),
+ GMFGenFactory.eINSTANCE.createGenChildNode()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/LinkEntryItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/LinkEntryItemProvider.java
new file mode 100644
index 000000000..f20cb2123
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/LinkEntryItemProvider.java
@@ -0,0 +1,143 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.LinkEntry;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.LinkEntry} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class LinkEntryItemProvider
+ extends ToolEntryItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public LinkEntryItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addGenLinkPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Gen Link feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addGenLinkPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_LinkEntry_genLink_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_LinkEntry_genLink_feature", "_UI_LinkEntry_type"),
+ GMFGenPackage.eINSTANCE.getLinkEntry_GenLink(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns LinkEntry.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/LinkEntry");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ LinkEntry linkEntry = (LinkEntry)object;
+ return getString("_UI_LinkEntry_type") + " " + linkEntry.getOrder();
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/NodeEntryItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/NodeEntryItemProvider.java
new file mode 100644
index 000000000..6220af893
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/NodeEntryItemProvider.java
@@ -0,0 +1,143 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.NodeEntry;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.NodeEntry} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NodeEntryItemProvider
+ extends ToolEntryItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NodeEntryItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addGenNodePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Gen Node feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addGenNodePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_NodeEntry_genNode_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_NodeEntry_genNode_feature", "_UI_NodeEntry_type"),
+ GMFGenPackage.eINSTANCE.getNodeEntry_GenNode(),
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns NodeEntry.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/NodeEntry");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ NodeEntry nodeEntry = (NodeEntry)object;
+ return getString("_UI_NodeEntry_type") + " " + nodeEntry.getOrder();
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/PaletteItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/PaletteItemProvider.java
new file mode 100644
index 000000000..31668f819
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/PaletteItemProvider.java
@@ -0,0 +1,245 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenFactory;
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.Palette;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.Palette} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PaletteItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PaletteItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addFlyoutPropertyDescriptor(object);
+ addNeedZoomToolsPropertyDescriptor(object);
+ addPackageNamePropertyDescriptor(object);
+ addFactoryClassNamePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Flyout feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addFlyoutPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Palette_flyout_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Palette_flyout_feature", "_UI_Palette_type"),
+ GMFGenPackage.eINSTANCE.getPalette_Flyout(),
+ true,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Need Zoom Tools feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNeedZoomToolsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Palette_needZoomTools_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Palette_needZoomTools_feature", "_UI_Palette_type"),
+ GMFGenPackage.eINSTANCE.getPalette_NeedZoomTools(),
+ true,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Package Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPackageNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Palette_packageName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Palette_packageName_feature", "_UI_Palette_type"),
+ GMFGenPackage.eINSTANCE.getPalette_PackageName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Factory Class Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addFactoryClassNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Palette_factoryClassName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Palette_factoryClassName_feature", "_UI_Palette_type"),
+ GMFGenPackage.eINSTANCE.getPalette_FactoryClassName(),
+ true,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(GMFGenPackage.eINSTANCE.getPalette_Groups());
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * This returns Palette.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/Palette");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((Palette)object).getPackageName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Palette_type") :
+ getString("_UI_Palette_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Palette.class)) {
+ case GMFGenPackage.PALETTE__FLYOUT:
+ case GMFGenPackage.PALETTE__NEED_ZOOM_TOOLS:
+ case GMFGenPackage.PALETTE__PACKAGE_NAME:
+ case GMFGenPackage.PALETTE__FACTORY_CLASS_NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case GMFGenPackage.PALETTE__GROUPS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getPalette_Groups(),
+ GMFGenFactory.eINSTANCE.createToolGroup()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ToolEntryItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ToolEntryItemProvider.java
new file mode 100644
index 000000000..3cd5d528b
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ToolEntryItemProvider.java
@@ -0,0 +1,141 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.ToolEntry;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.ToolEntry} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ToolEntryItemProvider
+ extends EntryBaseItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ToolEntryItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDefaultPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Default feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDefaultPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ToolEntry_default_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ToolEntry_default_feature", "_UI_ToolEntry_type"),
+ GMFGenPackage.eINSTANCE.getToolEntry_Default(),
+ true,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ ToolEntry toolEntry = (ToolEntry)object;
+ return getString("_UI_ToolEntry_type") + " " + toolEntry.getOrder();
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ToolEntry.class)) {
+ case GMFGenPackage.TOOL_ENTRY__DEFAULT:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ToolGroupItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ToolGroupItemProvider.java
new file mode 100644
index 000000000..9bd371463
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ToolGroupItemProvider.java
@@ -0,0 +1,171 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.gmf.codegen.gmfgen.GMFGenFactory;
+import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.ToolGroup;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.ToolGroup} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ToolGroupItemProvider
+ extends EntryBaseItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ToolGroupItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(GMFGenPackage.eINSTANCE.getToolGroup_NodeTools());
+ childrenFeatures.add(GMFGenPackage.eINSTANCE.getToolGroup_LinkTools());
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns ToolGroup.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return getResourceLocator().getImage("full/obj16/ToolGroup");
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ ToolGroup toolGroup = (ToolGroup)object;
+ return getString("_UI_ToolGroup_type") + " " + toolGroup.getOrder();
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ToolGroup.class)) {
+ case GMFGenPackage.TOOL_GROUP__NODE_TOOLS:
+ case GMFGenPackage.TOOL_GROUP__LINK_TOOLS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getToolGroup_NodeTools(),
+ GMFGenFactory.eINSTANCE.createNodeEntry()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getToolGroup_LinkTools(),
+ GMFGenFactory.eINSTANCE.createLinkEntry()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen/.classpath b/plugins/org.eclipse.gmf.codegen/.classpath
new file mode 100644
index 000000000..70659d8d8
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry sourcepath="JRE_SRC" kind="var" path="JRE_LIB"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src-templates"/>
+ <classpathentry kind="output" path="runtime"/>
+</classpath>
diff --git a/plugins/org.eclipse.gmf.codegen/.cvsignore b/plugins/org.eclipse.gmf.codegen/.cvsignore
new file mode 100644
index 000000000..e4d05d91a
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/.cvsignore
@@ -0,0 +1 @@
+runtime
diff --git a/plugins/org.eclipse.gmf.codegen/.jetproperties b/plugins/org.eclipse.gmf.codegen/.jetproperties
new file mode 100644
index 000000000..f0dd09e85
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/.jetproperties
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jet-settings>
+ <template-container>templates</template-container> <source-container>src-templates</source-container>
+</jet-settings>
diff --git a/plugins/org.eclipse.gmf.codegen/.project b/plugins/org.eclipse.gmf.codegen/.project
new file mode 100644
index 000000000..f365c756b
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.gmf.codegen</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.emf.codegen.JETBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <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.emf.codegen.jet.IJETNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.gmf.codegen/META-INF/MANIFEST.MF b/plugins/org.eclipse.gmf.codegen/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..c44fac850
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: GMF GenModel and Code Generation
+Bundle-SymbolicName: org.eclipse.gmf.codegen; singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Vendor: Eclipse.org
+Export-Package: org.eclipse.gmf.codegen.gmfgen,
+ org.eclipse.gmf.codegen.gmfgen.util,
+ org.eclipse.gmf.codegen.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.jdt.core,
+ org.eclipse.jface.text,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.codegen.ecore;visibility:=reexport,
+ org.eclipse.emf.edit,
+ org.eclipse.gef,
+ org.eclipse.gmf.runtime;visibility:=reexport
+Eclipse-AutoStart: true
diff --git a/plugins/org.eclipse.gmf.codegen/build.properties b/plugins/org.eclipse.gmf.codegen/build.properties
new file mode 100644
index 000000000..c5a5ef24e
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/build.properties
@@ -0,0 +1,13 @@
+bin.includes = plugin.xml,\
+ plugin.properties,\
+ META-INF/,\
+ .,\
+ models/dgmm0.ecore,\
+ models/dgmm0.genmodel
+jars.compile.order = .
+
+
+output.. = bin/
+
+source.. = src/,\
+ src-templates/
diff --git a/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore b/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore
new file mode 100644
index 000000000..00ac4d233
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore
@@ -0,0 +1,283 @@
+<?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="gmfgen"
+ nsURI="http://www.eclipse.org/gmf/2005/GenModel" nsPrefix="gmfgen">
+ <eClassifiers xsi:type="ecore:EClass" name="GenDiagram" eSuperTypes="#//GenCommonBase">
+ <eAnnotations source="http://www.eclipse.org/emf/2004/EmfaticAnnotationMap">
+ <details key="constraints" value="http://www.eclipse.org/gmf/2005/constraints"/>
+ </eAnnotations>
+ <eAnnotations source="http://www.eclipse.org/gmf/2005/constraints">
+ <details key="ocl" value="nodes->forAll(n : GenNode | self.links->forAll(l : GenLink | l.domainMetaClass &lt;> n.domainMetaClass))"/>
+ </eAnnotations>
+ <eOperations name="getPluginQualifiedClassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Need this one for NewDiagramAction. Takes first diagramRunTimeClass and it's package's namespace. Perhaps, should just reference appropriate genModel instead"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="getEditorQualifiedClassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eOperations name="getEditPartFactoryQualifiedClassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eOperations name="getMetaInfoFactoryQualifiedClassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eOperations name="findGenClass" eType="ecore:EClass ../../../plugin/org.eclipse.emf.codegen.ecore/model/GenModel.ecore#//GenClass">
+ <eParameters name="domainMetaClass" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ </eOperations>
+ <eOperations name="findGenFeature" eType="ecore:EClass ../../../plugin/org.eclipse.emf.codegen.ecore/model/GenModel.ecore#//GenFeature">
+ <eParameters name="domainMetaFeature" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature"/>
+ </eOperations>
+ <eOperations name="getRequiredPluginIDs" eType="#//StringArray"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="domainMetaModel" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="emfGenModel" lowerBound="1"
+ eType="ecore:EClass ../../../plugin/org.eclipse.emf.codegen.ecore/model/GenModel.ecore#//GenModel"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="domainDiagramElement" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="nodes" upperBound="-1"
+ eType="#//GenNode" containment="true" eOpposite="#//GenNode/diagram"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="links" upperBound="-1"
+ eType="#//GenLink" containment="true" eOpposite="#//GenLink/diagram"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="palette" lowerBound="1"
+ eType="#//Palette" containment="true" eOpposite="#//Palette/diagram"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="editPartsPackageName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="commandsPackageName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="editProvidersPackageName"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="pluginName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="providerName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="Sample Plugin Provider, Inc"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="pluginID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="pluginClassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="editorPackageName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="editorClassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="DiagramEditor"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="editPartFactoryClassName"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral="EditPartFactoryImpl"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="metaInfoFactoryClassName"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral="MetaInfoProviderAdapterFactory"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="hasDomainModel" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="diagramFileExtension" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="sameFileForDiagramAndModel"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Specified whether editor should create separate file for domain elements if diagram file references no domain model"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="StringArray" instanceClassName="String[]"/>
+ <eClassifiers xsi:type="ecore:EClass" name="GenCommonBase" abstract="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="One that combines attributes that are essential for EditPart"/>
+ </eAnnotations>
+ <eOperations name="getEditPartQualifiedClassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eOperations name="getMetaInfoProviderQualifiedClassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eOperations name="getDiagram" eType="#//GenDiagram"/>
+ <eOperations name="getClassNamePrefix" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eOperations name="getClassNameSuffux" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="diagramRunTimeClass" lowerBound="1"
+ eType="ecore:EClass ../../../plugin/org.eclipse.emf.codegen.ecore/model/GenModel.ecore#//GenClass"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="visualID" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="way to decide which editpart to use for specific diagram element. Maps to attribute in DRT."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="editPartClassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="metaInfoProviderClassName"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="GenBaseElement" abstract="true" eSuperTypes="#//GenCommonBase">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="would be better to call this one GenBaseDiagramElement, as it is for elements placed on the canvas"/>
+ </eAnnotations>
+ <eOperations name="hasNameToEdit" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="domainNameFeature" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EAttribute"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="foregroundColor" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="containmentMetaFeature"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EReference">
+ <eAnnotations source="http://www.eclipse.org/gmf/2005/constraints">
+ <details key="ocl" value="containmentFeature.isContainment"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="GenNode" eSuperTypes="#//GenBaseElement">
+ <eAnnotations source="http://www.eclipse.org/gmf/2005/constraints">
+ <details key="ocl" value="super.domainNameFeature.eClass == domainMetaClass"/>
+ </eAnnotations>
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="EClass mapped to Node"/>
+ </eAnnotations>
+ <eAnnotations source="http://www.eclipse.org/gmf/2005/constraints">
+ <details key="ocl" value="diagramRunTimeClass.eCoreClass.eAllSuperTypes->includes(diagramrt.DiagramNode)"/>
+ </eAnnotations>
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="super.diagramRunTimeClass - diagramrt.DiagramNode or its subclass"/>
+ </eAnnotations>
+ <eOperations name="initialize">
+ <eParameters name="eClass" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="diagram" lowerBound="1"
+ eType="#//GenDiagram" changeable="false" eOpposite="#//GenDiagram/nodes"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="domainMetaClass" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="viewmapURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="e.g. platform:/proj1/images/file.svg#fig1"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="nodeVisualizationKind"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="1"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="viewmapClass" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="org.eclipse.gmf.editor.viewmaps.SVGViewMap"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="affixedStereotypes" upperBound="-1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="backgroundColor" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="childContainers" upperBound="-1"
+ eType="#//GenChildContainer" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="childNodes" upperBound="-1"
+ eType="#//GenChildNode" containment="true" eOpposite="#//GenChildNode/parentNode"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="childContainersPlacement"
+ eType="#//CompartmentPlacementKind" defaultValueLiteral="TOOLBAR">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="valid only when there are childContainers"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="CompartmentPlacementKind">
+ <eLiterals name="FLOW"/>
+ <eLiterals name="TOOLBAR" value="1"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="GenChildNode" eSuperTypes="#//GenNode">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="groupID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="could be null if you don't use childContainers"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parentNode" lowerBound="1"
+ eType="#//GenNode" changeable="false" eOpposite="#//GenNode/childNodes"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="childMetaFeature" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="GenChildContainer">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Child container within node. Compartment, iow."/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="groupID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="titleKey" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="canCollapse" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="hideIfEmpty" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="needsTitle" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="layoutKind" eType="#//CompartmentLayoutKind"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="CompartmentLayoutKind">
+ <eLiterals name="BORDER"/>
+ <eLiterals name="FLOW" value="1"/>
+ <eLiterals name="SCROLL" value="2"/>
+ <eLiterals name="TOOLBAR" value="3"/>
+ <eLiterals name="XY" value="4"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="GenLink" abstract="true" eSuperTypes="#//GenBaseElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="diagram" lowerBound="1"
+ eType="#//GenDiagram" changeable="false" eOpposite="#//GenDiagram/links"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="domainLinkTargetFeature"
+ lowerBound="1" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="lineStyle" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="One of LINE_* constants defined in {@link org.eclipse.draw2d.Graphics}"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="figureQualifiedClassName"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral="org.eclipse.draw2d.PolylineConnection">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Shall be {@link org.eclipse.draw2d.PolylineConnection} or subclass thereof to use decorations"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="sourceDecorationFigureQualifiedClassName"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Implementation of {@link org.eclipse.draw2d.RotatableDecoration}"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="targetDecorationFigureQualifiedClassName"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Implementation of {@link org.eclipse.draw2d.RotatableDecoration}"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="GenLinkWithClass" eSuperTypes="#//GenLink">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Covers cases where domain model has dedicated metaclass for the link"/>
+ </eAnnotations>
+ <eOperations name="initialize">
+ <eParameters name="eClass" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="domainMetaClass" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass">
+ <eAnnotations source="http://www.eclipse.org/gmf/2005/constraints">
+ <details key="ocl" value="super.domainLinkTargetFeature.eContainingClass 'equals to' or 'superclass of' domainMetaClass"/>
+ </eAnnotations>
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="instances of this class will be represented by link"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="linkContainerFeature" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="references link containment feature, i.e. where to add created links (of type domainMetaClass)"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="GenLinkReferenceOnly" eSuperTypes="#//GenLink">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="When eReference/eAttribute in source node points directly to another node"/>
+ </eAnnotations>
+ <eOperations name="initialize">
+ <eParameters name="eFeature" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature"/>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Palette">
+ <eOperations name="getFactoryQualifiedClassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="diagram" lowerBound="1"
+ eType="#//GenDiagram" changeable="false" eOpposite="#//GenDiagram/palette"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="groups" lowerBound="1"
+ upperBound="-1" eType="#//ToolGroup" containment="true" eOpposite="#//ToolGroup/palette"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="flyout" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="needZoomTools" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="packageName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="factoryClassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="PaletteFactory"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="EntryBase" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="order" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="titleKey" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="descriptionKey" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="largeIconPath" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="smallIconPath" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ToolEntry" abstract="true" eSuperTypes="#//EntryBase">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="default" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="false"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NodeEntry" eSuperTypes="#//ToolEntry">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="genNode" lowerBound="1"
+ eType="#//GenNode"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="group" eType="#//ToolGroup"
+ changeable="false" transient="true" resolveProxies="false" eOpposite="#//ToolGroup/nodeTools"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="LinkEntry" eSuperTypes="#//ToolEntry">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="genLink" lowerBound="1"
+ eType="#//GenLink"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="group" eType="#//ToolGroup"
+ changeable="false" transient="true" resolveProxies="false" eOpposite="#//ToolGroup/linkTools"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ToolGroup" eSuperTypes="#//EntryBase">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="nodeTools" upperBound="-1"
+ eType="#//NodeEntry" containment="true" eOpposite="#//NodeEntry/group"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="linkTools" upperBound="-1"
+ eType="#//LinkEntry" containment="true" eOpposite="#//LinkEntry/group"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="palette" lowerBound="1"
+ eType="#//Palette" changeable="false" transient="true" resolveProxies="false"
+ eOpposite="#//Palette/groups"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel b/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel
new file mode 100644
index 000000000..5680c083e
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel
@@ -0,0 +1,155 @@
+<?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" modelDirectory="/org.eclipse.gmf.codegen/src"
+ editorDirectory="/org.eclipse.gmf.codegen.edit/src" modelPluginID="org.eclipse.gmf.codegen"
+ modelName="GMFGen" editPluginClass="org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin"
+ editorPluginClass="org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin" importerID="org.eclipse.emf.importer.ecore"
+ usedGenPackages="../../../plugin/org.eclipse.emf.codegen.ecore/model/GenModel.genmodel#//genmodel ../../../plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">
+ <foreignModel>gmfgen.ecore</foreignModel>
+ <genPackages prefix="GMFGen" basePackage="org.eclipse.gmf.codegen" disposableProviderFactory="true"
+ ecorePackage="gmfgen.ecore#/">
+ <genEnums ecoreEnum="gmfgen.ecore#//CompartmentPlacementKind">
+ <genEnumLiterals ecoreEnumLiteral="gmfgen.ecore#//CompartmentPlacementKind/FLOW"/>
+ <genEnumLiterals ecoreEnumLiteral="gmfgen.ecore#//CompartmentPlacementKind/TOOLBAR"/>
+ </genEnums>
+ <genEnums ecoreEnum="gmfgen.ecore#//CompartmentLayoutKind">
+ <genEnumLiterals ecoreEnumLiteral="gmfgen.ecore#//CompartmentLayoutKind/BORDER"/>
+ <genEnumLiterals ecoreEnumLiteral="gmfgen.ecore#//CompartmentLayoutKind/FLOW"/>
+ <genEnumLiterals ecoreEnumLiteral="gmfgen.ecore#//CompartmentLayoutKind/SCROLL"/>
+ <genEnumLiterals ecoreEnumLiteral="gmfgen.ecore#//CompartmentLayoutKind/TOOLBAR"/>
+ <genEnumLiterals ecoreEnumLiteral="gmfgen.ecore#//CompartmentLayoutKind/XY"/>
+ </genEnums>
+ <genDataTypes ecoreDataType="gmfgen.ecore#//StringArray"/>
+ <genClasses ecoreClass="gmfgen.ecore#//GenDiagram">
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenDiagram/domainMetaModel"/>
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenDiagram/emfGenModel"/>
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenDiagram/domainDiagramElement"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgen.ecore#//GenDiagram/nodes"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgen.ecore#//GenDiagram/links"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgen.ecore#//GenDiagram/palette"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDiagram/editPartsPackageName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDiagram/commandsPackageName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDiagram/editProvidersPackageName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDiagram/pluginName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDiagram/providerName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDiagram/pluginID"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDiagram/pluginClassName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDiagram/editorPackageName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDiagram/editorClassName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDiagram/editPartFactoryClassName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDiagram/metaInfoFactoryClassName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDiagram/hasDomainModel"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDiagram/diagramFileExtension"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenDiagram/sameFileForDiagramAndModel"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenDiagram/getPluginQualifiedClassName"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenDiagram/getEditorQualifiedClassName"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenDiagram/getEditPartFactoryQualifiedClassName"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenDiagram/getMetaInfoFactoryQualifiedClassName"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenDiagram/findGenClass">
+ <genParameters ecoreParameter="gmfgen.ecore#//GenDiagram/findGenClass/domainMetaClass"/>
+ </genOperations>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenDiagram/findGenFeature">
+ <genParameters ecoreParameter="gmfgen.ecore#//GenDiagram/findGenFeature/domainMetaFeature"/>
+ </genOperations>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenDiagram/getRequiredPluginIDs"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="gmfgen.ecore#//GenCommonBase">
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenCommonBase/diagramRunTimeClass"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenCommonBase/visualID"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenCommonBase/editPartClassName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenCommonBase/metaInfoProviderClassName"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenCommonBase/getEditPartQualifiedClassName"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenCommonBase/getMetaInfoProviderQualifiedClassName"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenCommonBase/getDiagram"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenCommonBase/getClassNamePrefix"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenCommonBase/getClassNameSuffux"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="gmfgen.ecore#//GenBaseElement">
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenBaseElement/domainNameFeature"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenBaseElement/foregroundColor"/>
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenBaseElement/containmentMetaFeature"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenBaseElement/hasNameToEdit"/>
+ </genClasses>
+ <genClasses ecoreClass="gmfgen.ecore#//GenNode">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenNode/diagram"/>
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenNode/domainMetaClass"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenNode/viewmapURI"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenNode/nodeVisualizationKind"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenNode/viewmapClass"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenNode/affixedStereotypes"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenNode/backgroundColor"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgen.ecore#//GenNode/childContainers"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgen.ecore#//GenNode/childNodes"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenNode/childContainersPlacement"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenNode/initialize">
+ <genParameters ecoreParameter="gmfgen.ecore#//GenNode/initialize/eClass"/>
+ </genOperations>
+ </genClasses>
+ <genClasses ecoreClass="gmfgen.ecore#//GenChildNode">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenChildNode/groupID"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenChildNode/parentNode"/>
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenChildNode/childMetaFeature"/>
+ </genClasses>
+ <genClasses ecoreClass="gmfgen.ecore#//GenChildContainer">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenChildContainer/groupID"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenChildContainer/titleKey"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenChildContainer/canCollapse"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenChildContainer/hideIfEmpty"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenChildContainer/needsTitle"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenChildContainer/layoutKind"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="gmfgen.ecore#//GenLink">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenLink/diagram"/>
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenLink/domainLinkTargetFeature"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenLink/lineStyle"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenLink/figureQualifiedClassName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenLink/sourceDecorationFigureQualifiedClassName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//GenLink/targetDecorationFigureQualifiedClassName"/>
+ </genClasses>
+ <genClasses ecoreClass="gmfgen.ecore#//GenLinkWithClass">
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenLinkWithClass/domainMetaClass"/>
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//GenLinkWithClass/linkContainerFeature"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//GenLinkWithClass/initialize">
+ <genParameters ecoreParameter="gmfgen.ecore#//GenLinkWithClass/initialize/eClass"/>
+ </genOperations>
+ </genClasses>
+ <genClasses ecoreClass="gmfgen.ecore#//GenLinkReferenceOnly">
+ <genOperations ecoreOperation="gmfgen.ecore#//GenLinkReferenceOnly/initialize">
+ <genParameters ecoreParameter="gmfgen.ecore#//GenLinkReferenceOnly/initialize/eFeature"/>
+ </genOperations>
+ </genClasses>
+ <genClasses ecoreClass="gmfgen.ecore#//Palette">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//Palette/diagram"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgen.ecore#//Palette/groups"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//Palette/flyout"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//Palette/needZoomTools"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//Palette/packageName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//Palette/factoryClassName"/>
+ <genOperations ecoreOperation="gmfgen.ecore#//Palette/getFactoryQualifiedClassName"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="gmfgen.ecore#//EntryBase">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//EntryBase/order"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//EntryBase/titleKey"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//EntryBase/descriptionKey"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//EntryBase/largeIconPath"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//EntryBase/smallIconPath"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="gmfgen.ecore#//ToolEntry">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//ToolEntry/default"/>
+ </genClasses>
+ <genClasses ecoreClass="gmfgen.ecore#//NodeEntry">
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//NodeEntry/genNode"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//NodeEntry/group"/>
+ </genClasses>
+ <genClasses ecoreClass="gmfgen.ecore#//LinkEntry">
+ <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//LinkEntry/genLink"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//LinkEntry/group"/>
+ </genClasses>
+ <genClasses ecoreClass="gmfgen.ecore#//ToolGroup">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgen.ecore#//ToolGroup/nodeTools"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgen.ecore#//ToolGroup/linkTools"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgen.ecore#//ToolGroup/palette"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/org.eclipse.gmf.codegen/plugin.xml b/plugins/org.eclipse.gmf.codegen/plugin.xml
new file mode 100644
index 000000000..f1976eb3f
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/plugin.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.eclipse.org/gmf/2005/GenModel"
+ class = "org.eclipse.gmf.codegen.gmfgen.GMFGenPackage"
+ genModel = "models/gmfgen.genmodel" />
+ </extension>
+
+</plugin>
+
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/CanvasEditPartGen.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/CanvasEditPartGen.java
new file mode 100644
index 000000000..f83a56852
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/CanvasEditPartGen.java
@@ -0,0 +1,57 @@
+package org.eclipse.gmf.codegen.templates.diacanvas;
+
+import org.eclipse.gmf.codegen.gmfgen.*;
+import org.eclipse.gmf.codegen.util.ImportUtil;
+
+public class CanvasEditPartGen
+{
+ protected static String nl;
+ public static synchronized CanvasEditPartGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ CanvasEditPartGen result = new CanvasEditPartGen();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "package ";
+ protected final String TEXT_2 = ";";
+ protected final String TEXT_3 = NL + NL + "import java.util.List;" + NL + "import java.util.Map;" + NL + "import org.eclipse.draw2d.*;" + NL + "import org.eclipse.draw2d.geometry.Dimension;" + NL + "import org.eclipse.draw2d.geometry.Point;" + NL + "import org.eclipse.emf.ecore.EObject;" + NL + "import org.eclipse.emf.ecore.util.EContentAdapter;" + NL + "import org.eclipse.emf.common.notify.Notification;" + NL + "import org.eclipse.gef.*;" + NL + "import org.eclipse.gef.commands.*;" + NL + "import org.eclipse.gef.editparts.*;" + NL + "import org.eclipse.gef.editpolicies.*;" + NL + "import org.eclipse.gef.requests.ChangeBoundsRequest;" + NL + "import org.eclipse.gef.requests.CreateRequest;" + NL + "import org.eclipse.gmf.diagramrt.*;" + NL + "import org.eclipse.gmf.runtime.gef.commands.CreateDiagramNodeCommand;" + NL + "import org.eclipse.gmf.runtime.gef.commands.ChangeNodeBoundsCommand;" + NL + "import org.eclipse.gmf.runtime.update.DiagramUpdateManager;";
+ protected final String TEXT_4 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
+ protected final String TEXT_5 = " extends AbstractGraphicalEditPart {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final ";
+ protected final String TEXT_6 = " myColorSupport;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final DiagramUpdateManager myDiagramListener = new DiagramUpdateManager() {" + NL + "\t\tprotected Map getEditPartRegistry() {" + NL + "\t\t\treturn getViewer().getEditPartRegistry();" + NL + "\t\t}" + NL + "\t};" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_7 = "(DiagramCanvas model) {" + NL + "\t\tsetModel(model);" + NL + "\t\tmyColorSupport = new ";
+ protected final String TEXT_8 = "();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {" + NL + "\t\tinstallEditPolicy(EditPolicy.COMPONENT_ROLE, new RootComponentEditPolicy());" + NL + "\t\tinstallEditPolicy(EditPolicy.LAYOUT_ROLE, new XYLayoutEditPolicy() {" + NL + "\t\t\t// " + NL + "\t\t\t// FIXME !!! " + NL + "\t\t\t//" + NL + "\t\t\tprotected Command createAddCommand(EditPart child, Object constraint) {" + NL + "\t\t\t\treturn UnexecutableCommand.INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(EditPart child, Object constraint) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(ChangeBoundsRequest request, EditPart child, Object constraint) {" + NL + "\t\t\t\tDiagramNode node = (DiagramNode) child.getModel();" + NL + "\t\t\t\tPoint newLocation = node.getLocation().getTranslated(request.getMoveDelta());" + NL + "\t\t\t\tDimension newSize = node.getSize().getExpanded(request.getSizeDelta());" + NL + "\t\t\t\treturn new ChangeNodeBoundsCommand(node, newLocation, newSize);" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command getCreateCommand(CreateRequest request) {" + NL + "\t\t\t\tif (request.getNewObjectType() != DiagramNode.class) {" + NL + "\t\t\t\t\treturn null;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tDiagramNode diagramNode = (DiagramNode) request.getNewObject();" + NL + "\t\t\t\tif (request.getLocation() != null) {" + NL + "\t\t\t\t\tPoint location = request.getLocation().getCopy();" + NL + "\t\t\t\t\tgetHostFigure().translateToRelative(location);" + NL + "\t\t\t\t\tdiagramNode.setLocation(location);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tif (request.getSize() != null && !request.getSize().isEmpty()) {";
+ protected final String TEXT_9 = NL + "\t\t\t\t\tdiagramNode.setSize(request.getSize());" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn new CreateDiagramNodeCommand(diagramNode, getDiagramCanvas());" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command getDeleteDependantCommand(Request arg0) {" + NL + "\t\t\t\t// TODO Auto-generated method stub" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure createFigure() {" + NL + "\t\tFigure f = new FreeformLayer();" + NL + "\t\tf.setBorder(new MarginBorder(5));" + NL + "\t\tf.setLayoutManager(new FreeformLayout());" + NL + "\t\treturn f;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelChildren() {" + NL + "\t\treturn getDiagramCanvas().getNodes();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {" + NL + "\t\tif (SnapToHelper.class == key) {" + NL + "\t\t\treturn new SnapToGrid(this);" + NL + "\t\t}" + NL + "\t\treturn super.getAdapter(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic DiagramCanvas getDiagramCanvas() {" + NL + "\t\treturn (DiagramCanvas) getModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_10 = " getColorSupport() {" + NL + "\t\treturn myColorSupport;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tgetDiagramCanvas().eAdapters().add(myDiagramListener);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tgetDiagramCanvas().eAdapters().remove(myDiagramListener);" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL + "}";
+
+ public String generate(Object argument)
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+ GenDiagram genDiagram = (GenDiagram) argument;
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(genDiagram.getEditPartsPackageName());
+ stringBuffer.append(TEXT_2);
+ ImportUtil importManager = new ImportUtil(genDiagram.getEditPartsPackageName());
+ stringBuffer.append(TEXT_3);
+ importManager.markImportLocation(stringBuffer);
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(genDiagram.getEditPartClassName());
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.gef.ColorSupport"));
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append(genDiagram.getEditPartClassName());
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.gef.ColorSupport"));
+ stringBuffer.append(TEXT_8);
+
+ // XXX plus subject to 'resizable' attribute of the node?
+
+ stringBuffer.append(TEXT_9);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.gef.ColorSupport"));
+ stringBuffer.append(TEXT_10);
+ importManager.emitSortedImports();
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/EditPartFactoryGen.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/EditPartFactoryGen.java
new file mode 100644
index 000000000..2bce8e976
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/EditPartFactoryGen.java
@@ -0,0 +1,136 @@
+package org.eclipse.gmf.codegen.templates.diacanvas;
+
+import org.eclipse.gmf.codegen.gmfgen.*;
+import org.eclipse.emf.ecore.*;
+import org.eclipse.emf.codegen.ecore.genmodel.*;
+import java.util.*;
+import org.eclipse.gmf.codegen.util.ImportUtil;
+
+public class EditPartFactoryGen
+{
+ protected static String nl;
+ public static synchronized EditPartFactoryGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ EditPartFactoryGen result = new EditPartFactoryGen();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "package ";
+ protected final String TEXT_2 = ";";
+ protected final String TEXT_3 = NL + NL + "import org.eclipse.emf.ecore.*;" + NL + "import org.eclipse.gef.*;" + NL + "import org.eclipse.gmf.diagramrt.*;";
+ protected final String TEXT_4 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
+ protected final String TEXT_5 = " implements EditPartFactory {" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EditPart createEditPart(EditPart context, Object model) {" + NL + "\t\tif (model instanceof ChildNode) {" + NL + "\t\t\treturn createChildEditPart(context, (ChildNode) model);" + NL + "\t\t}" + NL + "\t\tif (model instanceof DiagramNode) {" + NL + "\t\t\treturn createNodeEditPart(context, (DiagramNode) model);" + NL + "\t\t}" + NL + "\t\tif (model instanceof DiagramLink) {" + NL + "\t\t\treturn createLinkEditPart(context, (DiagramLink) model);" + NL + "\t\t}" + NL + "\t\tif (model instanceof DiagramCanvas) {" + NL + "\t\t\treturn createCanvasEditPart(context, (DiagramCanvas) model);" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EditPart createNodeEditPart(EditPart context, DiagramNode diagramElement) {" + NL + "\t\tfinal int visualID = diagramElement.getVisualID();";
+ protected final String TEXT_6 = NL + "\t\t";
+ protected final String TEXT_7 = "\t\tif (visualID == ";
+ protected final String TEXT_8 = ".VISUAL_ID) {" + NL + "\t\t\treturn new ";
+ protected final String TEXT_9 = "(diagramElement);" + NL + "\t\t}";
+ protected final String TEXT_10 = NL + "\t\tSystem.err.println(\"No NodeEditPart for \" + diagramElement + \" with visualID=\" + visualID);" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EditPart createLinkEditPart(EditPart context, DiagramLink diagramElement) {" + NL + "\t\tfinal int visualID = diagramElement.getVisualID();";
+ protected final String TEXT_11 = NL + "\t\t";
+ protected final String TEXT_12 = "\t\tif (visualID == ";
+ protected final String TEXT_13 = ".VISUAL_ID) {" + NL + "\t\t\treturn new ";
+ protected final String TEXT_14 = "(diagramElement);" + NL + "\t\t}";
+ protected final String TEXT_15 = NL + "\t\tSystem.err.println(\"No LinkEditPart for \" + diagramElement + \" with visualID=\" + visualID);" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EditPart createChildEditPart(EditPart context, ChildNode diagramElement) {" + NL + "\t\tDiagramNode parentNode = (DiagramNode) context.getModel();" + NL + "\t\tfinal EClass parentMetaClass = parentNode.getDomainModelElement().eClass();" + NL + "\t\tfinal EClass childMetaClass = diagramElement.getDomainModelElement().eClass();";
+ protected final String TEXT_16 = NL + "\t\t";
+ protected final String TEXT_17 = NL + "\t\tif (parentMetaClass == ";
+ protected final String TEXT_18 = ".eINSTANCE.get";
+ protected final String TEXT_19 = "()) {";
+ protected final String TEXT_20 = NL + "\t\t\tif (childMetaClass == ";
+ protected final String TEXT_21 = ".eINSTANCE.get";
+ protected final String TEXT_22 = "()) {" + NL + "\t\t\t\t// && genChildNode.getGroupID == diagramElement.getGroupID()?" + NL + "\t\t\t\treturn new ";
+ protected final String TEXT_23 = "(diagramElement);" + NL + "\t\t\t}";
+ protected final String TEXT_24 = NL + "\t\t}";
+ protected final String TEXT_25 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EditPart createCanvasEditPart(EditPart context, DiagramCanvas model) {" + NL + "\t\treturn new ";
+ protected final String TEXT_26 = "(model);" + NL + "\t}" + NL + "}";
+
+ public String generate(Object argument)
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+ GenDiagram genDiagram = (GenDiagram) argument;
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(genDiagram.getEditPartsPackageName());
+ stringBuffer.append(TEXT_2);
+ ImportUtil importManager = new ImportUtil(genDiagram.getEditPartsPackageName());
+ stringBuffer.append(TEXT_3);
+ importManager.markImportLocation(stringBuffer);
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(genDiagram.getEditPartFactoryClassName());
+ stringBuffer.append(TEXT_5);
+
+ //HashMap domainToGenNode = new HashMap();
+ for (Iterator it = genDiagram.getNodes().iterator(); it.hasNext();) {
+ GenNode genNode = (GenNode) it.next();
+
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append(importManager.getImportedName(genNode.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_8);
+ stringBuffer.append(importManager.getImportedName(genNode.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_9);
+
+ }
+
+ stringBuffer.append(TEXT_10);
+
+ for (Iterator it = genDiagram.getLinks().iterator(); it.hasNext();) {
+ GenLink genLink = (GenLink) it.next();
+
+ stringBuffer.append(TEXT_11);
+ stringBuffer.append(TEXT_12);
+ stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_13);
+ stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_14);
+
+ }
+
+ stringBuffer.append(TEXT_15);
+
+ for (Iterator it = genDiagram.getNodes().iterator(); it.hasNext();) {
+ GenNode genNode = (GenNode) it.next();
+ if (!genNode.getChildNodes().isEmpty()) {
+
+ stringBuffer.append(TEXT_16);
+
+ EClass next = genNode.getDomainMetaClass();
+ GenClass nextGen = genDiagram.findGenClass(next);
+ GenPackage genPackage = nextGen.getGenPackage();
+ importManager.addImport(genPackage.getInterfacePackageName(), genPackage.getPackageInterfaceName());
+
+ stringBuffer.append(TEXT_17);
+ stringBuffer.append(genPackage.getPackageInterfaceName());
+ stringBuffer.append(TEXT_18);
+ stringBuffer.append(nextGen.getClassifierAccessorName());
+ stringBuffer.append(TEXT_19);
+
+ for (Iterator it2 = genNode.getChildNodes().iterator(); it2.hasNext();) {
+ GenChildNode genChildNode = (GenChildNode) it2.next();
+ GenClass nextGenChildClass = genDiagram.findGenClass(genChildNode.getDomainMetaClass());
+ GenPackage nextChildGenPackage = nextGenChildClass.getGenPackage();
+ if (nextChildGenPackage != genPackage) {
+ importManager.addImport(nextChildGenPackage.getInterfacePackageName(), nextChildGenPackage.getPackageInterfaceName());
+ }
+
+ stringBuffer.append(TEXT_20);
+ stringBuffer.append(nextChildGenPackage.getPackageInterfaceName());
+ stringBuffer.append(TEXT_21);
+ stringBuffer.append(nextGenChildClass.getClassifierAccessorName());
+ stringBuffer.append(TEXT_22);
+ stringBuffer.append(importManager.getImportedName(genChildNode.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_23);
+
+ }
+
+ stringBuffer.append(TEXT_24);
+ }
+ }
+
+ stringBuffer.append(TEXT_25);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_26);
+ importManager.emitSortedImports();
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/EditorGen.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/EditorGen.java
new file mode 100644
index 000000000..ccfedf307
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/EditorGen.java
@@ -0,0 +1,118 @@
+package org.eclipse.gmf.codegen.templates.diacanvas;
+
+import org.eclipse.gmf.codegen.gmfgen.*;
+import org.eclipse.emf.ecore.*;
+import org.eclipse.emf.codegen.ecore.genmodel.*;
+import java.util.*;
+import org.eclipse.gmf.codegen.util.ImportUtil;
+
+public class EditorGen
+{
+ protected static String nl;
+ public static synchronized EditorGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ EditorGen result = new EditorGen();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "package ";
+ protected final String TEXT_2 = ";";
+ protected final String TEXT_3 = NL + NL + "import java.io.IOException;" + NL + "import java.util.ArrayList;" + NL + "import java.util.EventObject;" + NL + "import java.util.Collections;" + NL + "import java.util.Iterator;" + NL + "import java.util.List;" + NL + "import org.eclipse.core.resources.IFile;" + NL + "import org.eclipse.core.runtime.IProgressMonitor;" + NL + "import org.eclipse.draw2d.geometry.Dimension;" + NL + "import org.eclipse.emf.common.command.BasicCommandStack;" + NL + "import org.eclipse.emf.common.command.CommandStackListener;" + NL + "import org.eclipse.emf.common.notify.AdapterFactory;" + NL + "import org.eclipse.emf.common.util.URI;" + NL + "import org.eclipse.emf.ecore.EObject;" + NL + "import org.eclipse.emf.ecore.resource.Resource;" + NL + "import org.eclipse.emf.ecore.resource.ResourceSet;" + NL + "import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;" + NL + "import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;" + NL + "import org.eclipse.emf.edit.provider.ComposedAdapterFactory;" + NL + "import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;" + NL + "import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;" + NL + "import org.eclipse.jface.action.Action;" + NL + "import org.eclipse.jface.action.IMenuManager;" + NL + "import org.eclipse.jface.dialogs.MessageDialog;" + NL + "import org.eclipse.swt.SWT;" + NL + "import org.eclipse.swt.widgets.Display;" + NL + "import org.eclipse.ui.IEditorInput;" + NL + "import org.eclipse.ui.IEditorPart;" + NL + "import org.eclipse.ui.IFileEditorInput;" + NL + "import org.eclipse.ui.IWorkbenchPart;" + NL + "import org.eclipse.ui.actions.ActionFactory;" + NL + "import org.eclipse.ui.views.contentoutline.IContentOutlinePage;" + NL + "import org.eclipse.ui.views.properties.IPropertySheetPage;" + NL + "import org.eclipse.gef.*;" + NL + "import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;" + NL + "import org.eclipse.gef.palette.PaletteRoot;" + NL + "import org.eclipse.gef.ui.actions.*;" + NL + "import org.eclipse.gef.ui.palette.FlyoutPaletteComposite.FlyoutPreferences;" + NL + "import org.eclipse.gef.ui.parts.*;" + NL + "import org.eclipse.gmf.diagramrt.DiagramCanvas;" + NL + "import org.eclipse.gmf.edit.provider.metainfo.AdapterFactoryMetaInfoSource;" + NL + "import org.eclipse.gmf.util.SelectionUnwrapProvider;";
+ protected final String TEXT_4 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
+ protected final String TEXT_5 = " extends GraphicalEditorWithFlyoutPalette {" + NL + "\t// XXX subclass or add adapter to myResourceSet to manage IEditingDomainProvider" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final ResourceSet myResourceSet = new ResourceSetImpl();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate DiagramCanvas myDiagram;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate PaletteRoot myPaletteRoot;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate AdapterFactory myDomainModelAdapterFactory;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_6 = "() {" + NL + "\t\t// FIXME move to #init() - setEditDomain calls other methods of this class, so it's better to have construction complete" + NL + "\t\tsetEditDomain(new DefaultEditDomain(this));" + NL + "\t\tsetupDomainsEMFEdititngDomain();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void configureGraphicalViewer() {" + NL + "\t\tsuper.configureGraphicalViewer();" + NL + "" + NL + "\t\tGraphicalViewer viewer = getGraphicalViewer();" + NL + "\t\tviewer.setRootEditPart(new ScalableFreeformRootEditPart());" + NL + "\t\tviewer.setProperty(SnapToGrid.PROPERTY_GRID_SPACING, new Dimension(25, 25));" + NL + "\t\tviewer.setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE, Boolean.TRUE);" + NL + "\t\tviewer.setEditPartFactory(new ";
+ protected final String TEXT_7 = "());" + NL + "\t\tContextMenuProvider contextMenu = new ContextMenuProvider(viewer) {" + NL + "\t\t\tpublic void buildContextMenu(IMenuManager menu) {" + NL + "\t\t\t\tGEFActionConstants.addStandardActionGroups(menu);" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tviewer.setContextMenu(contextMenu);" + NL + "\t\tgetSite().registerContextMenu(contextMenu, new SelectionUnwrapProvider(viewer));" + NL + "\t\t// XXX registerContextMenu(\"anotherID\", contextMenu, viewer); - for actions that need editPart in selection?" + NL + "" + NL + "\t\t// XXX menu manager as part of genModel?" + NL + "" + NL + "\t\tKeyHandler keyHandler = new GraphicalViewerKeyHandler(viewer);" + NL + "\t\tkeyHandler.put(KeyStroke.getPressed(SWT.F2, 0), getActionRegistry().getAction(GEFActionConstants.DIRECT_EDIT));" + NL + "\t\tkeyHandler.put(KeyStroke.getPressed(SWT.DEL, SWT.DEL, 0), getActionRegistry().getAction(ActionFactory.DELETE.getId()));" + NL + "\t\tviewer.setKeyHandler(keyHandler);" + NL + "" + NL + "\t\tviewer.setProperty(MouseWheelHandler.KeyGenerator.getKey(SWT.CTRL), MouseWheelZoomHandler.SINGLETON);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createActions() {" + NL + "\t\tsuper.createActions();" + NL + "" + NL + "\t\tAction action = new DirectEditAction((IWorkbenchPart)this);" + NL + "\t\tgetActionRegistry().registerAction(action);" + NL + "\t\tgetSelectionActions().add(action.getId());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected FlyoutPreferences getPalettePreferences() {" + NL + "\t\treturn new ";
+ protected final String TEXT_8 = "(";
+ protected final String TEXT_9 = ".getInstance().getPluginPreferences());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected PaletteRoot getPaletteRoot() {" + NL + "\t\tif (myPaletteRoot == null) {" + NL + "\t\t\tmyPaletteRoot = ";
+ protected final String TEXT_10 = ".createPalette(getAdapterFactory4DomainModel());" + NL + "\t\t}" + NL + "\t\treturn myPaletteRoot;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class type) {" + NL + "\t\tif (type == IPropertySheetPage.class) {" + NL + "\t\t\t// placeholder" + NL + "\t\t} else if (type == IContentOutlinePage.class) {" + NL + "\t\t\t// another placeholder" + NL + "\t\t}" + NL + "\t\treturn super.getAdapter(type);" + NL + "\t}" + NL + "" + NL + "\t// TODO later..." + NL + "//\tprotected PaletteViewerProvider createPaletteViewerProvider() {" + NL + "//\t\treturn new PaletteViewerProvider(getEditDomain()) {" + NL + "//\t\t\tprotected void configurePaletteViewer(PaletteViewer viewer) {" + NL + "//\t\t\t\tsuper.configurePaletteViewer(viewer);" + NL + "//\t\t\t\tviewer.setCustomizer(new PaletteCustomizer()..." + NL + "//\t\t\t\t// to get Customize... action on palette " + NL + "//\t\t\t}" + NL + "//\t\t};" + NL + "//\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void initializeGraphicalViewer() {" + NL + "\t\tsuper.initializeGraphicalViewer();" + NL + "\t\tGraphicalViewer viewer = getGraphicalViewer();" + NL + "\t\tviewer.setContents(myDiagram);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setInput(IEditorInput input) {" + NL + "\t\tsuper.setInput(input);" + NL + "" + NL + "\t\tIFile file = ((IFileEditorInput)input).getFile();" + NL + "\t\tURI uri = URI.createURI(file.getFullPath().toString());" + NL + "\t\tResource resource = myResourceSet.getResource(uri, true);" + NL + "\t\tmyDiagram = (DiagramCanvas) resource.getContents().get(0);" + NL + "\t\tsetupDomainForDiagram(file);" + NL + "\t\tAdapterFactory metaInfoAdapterFactory = new ";
+ protected final String TEXT_11 = "();" + NL + "\t\tmyDiagram.eAdapters().add(new AdapterFactoryMetaInfoSource(metaInfoAdapterFactory));" + NL + "" + NL + "\t\tsetPartName(file.getName());" + NL + "\t\tsetContentDescription(file.getFullPath().toString());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void doSave(IProgressMonitor monitor) {" + NL + "\t\ttry {" + NL + "\t\t\tfor (Iterator it = myResourceSet.getResources().iterator(); it.hasNext();) {" + NL + "\t\t\t\t((Resource) it.next()).save(Collections.EMPTY_MAP);" + NL + "\t\t\t}" + NL + "\t\t\tgetCommandStack().markSaveLocation();" + NL + "\t\t} catch (IOException ex) {" + NL + "\t\t\t// TODO handle exception" + NL + "\t\t\tex.printStackTrace();" + NL + "\t\t\tMessageDialog.openWarning(getGraphicalControl().getShell(), \"Errors Detected\", ex.getMessage());" + NL + "\t\t}" + NL + "\t}" + NL + "\tpublic void doSaveAs() {" + NL + "\t}" + NL + "\tpublic boolean isSaveAsAllowed() {" + NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void commandStackChanged(EventObject event) {" + NL + "\t\tfirePropertyChange(PROP_DIRTY);" + NL + "\t\tsuper.commandStackChanged(event);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void setupDomainForDiagram(IFile file) {" + NL + "\t\tEObject domainContainer = myDiagram.getDomainContainerObject();";
+ protected final String TEXT_12 = NL + "\t\tif (domainContainer == null || domainContainer.eClass() != ";
+ protected final String TEXT_13 = ".eINSTANCE.get";
+ protected final String TEXT_14 = "()) {" + NL + "\t\t\t// XXX limiting outselves to single container which itself has no containers" + NL + "\t\t\tdomainContainer = ";
+ protected final String TEXT_15 = ".eINSTANCE.create";
+ protected final String TEXT_16 = "();";
+ protected final String TEXT_17 = NL + "\t\t\tResource domainRes = myDiagram.eResource();";
+ protected final String TEXT_18 = NL + "\t\t\tURI domainResURI = URI.createURI(file.getFullPath().removeFileExtension().addFileExtension(\"";
+ protected final String TEXT_19 = "\").toString());" + NL + "\t\t\tResource domainRes = myResourceSet.createResource(domainResURI);";
+ protected final String TEXT_20 = NL + "\t\t\tdomainRes.getContents().add(domainContainer);" + NL + "\t\t\tmyDiagram.setDomainResource(domainRes);" + NL + "\t\t\tmyDiagram.setDomainContainerObject(domainContainer);" + NL + "\t\t} else {" + NL + "\t\t\t// XXX keeping domainResource in addition to domainContainerObject" + NL + "\t\t\t// for future - when we implement support for \"no dedicated domain container object\"" + NL + "\t\t\t// case, and created nodes go directly to the object" + NL + "\t\t\tmyDiagram.setDomainResource(domainContainer.eResource());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected AdapterFactory getAdapterFactory4DomainModel() {" + NL + "\t\tif (myDomainModelAdapterFactory == null) {" + NL + "\t\t\tArrayList factories = new ArrayList();" + NL + "\t\t\tfillItemProviderFactories(factories);" + NL + "\t\t\tmyDomainModelAdapterFactory = new ComposedAdapterFactory(factories);" + NL + "\t\t}" + NL + "\t\treturn myDomainModelAdapterFactory;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setupDomainsEMFEdititngDomain() {" + NL + "\t\tBasicCommandStack commandStack = new BasicCommandStack();" + NL + "\t\tcommandStack.addCommandStackListener(new CommandStackListener() {" + NL + "\t\t\tpublic void commandStackChanged(final EventObject event) {" + NL + "\t\t\t\tgetEditorDisplay().asyncExec(new Runnable() {" + NL + "\t\t\t\t\tpublic void run() {" + NL + "\t\t\t\t\t\tfirePropertyChange(IEditorPart.PROP_DIRTY);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t});" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t\tAdapterFactoryEditingDomain afed = new AdapterFactoryEditingDomain(getAdapterFactory4DomainModel(), commandStack);" + NL + "\t\tmyResourceSet.eAdapters().add(new AdapterFactoryEditingDomain.EditingDomainProvider(afed));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tDisplay getEditorDisplay() {" + NL + "\t\treturn getGraphicalControl().getDisplay();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void fillItemProviderFactories(List factories) {";
+ protected final String TEXT_21 = NL + "\t\tfactories.add(new ";
+ protected final String TEXT_22 = "());";
+ protected final String TEXT_23 = NL + "\t\tfactories.add(new ";
+ protected final String TEXT_24 = "());";
+ protected final String TEXT_25 = NL + "\t\tfactories.add(new ResourceItemProviderAdapterFactory());" + NL + "\t\tfactories.add(new ReflectiveItemProviderAdapterFactory());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * make accessible for command stack listener" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void firePropertyChange(int property) {" + NL + "\t\tsuper.firePropertyChange(property);" + NL + "\t}" + NL + "}";
+
+ public String generate(Object argument)
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+ GenDiagram genDiagram = (GenDiagram) argument;
+ GenModel genModel = genDiagram.getEmfGenModel();
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(genDiagram.getEditorPackageName());
+ stringBuffer.append(TEXT_2);
+ ImportUtil importManager = new ImportUtil(genDiagram.getEditorPackageName());
+ stringBuffer.append(TEXT_3);
+ importManager.markImportLocation(stringBuffer);
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(genDiagram.getEditorClassName());
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(genDiagram.getEditorClassName());
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName()));
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.util.DefaultPalettePreferences"));
+ stringBuffer.append(TEXT_8);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getPluginQualifiedClassName()));
+ stringBuffer.append(TEXT_9);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getPalette().getFactoryQualifiedClassName()));
+ stringBuffer.append(TEXT_10);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getMetaInfoFactoryQualifiedClassName()));
+ stringBuffer.append(TEXT_11);
+
+ EClass domainContainerClass = genDiagram.getDomainDiagramElement();
+ GenClass genClass = genDiagram.findGenClass(domainContainerClass);
+ GenPackage genPackage = genClass.getGenPackage();
+ importManager.addImport(genPackage.getInterfacePackageName(), genPackage.getPackageInterfaceName());
+
+ stringBuffer.append(TEXT_12);
+ stringBuffer.append(genPackage.getPackageInterfaceName());
+ stringBuffer.append(TEXT_13);
+ stringBuffer.append(genClass.getClassifierAccessorName());
+ stringBuffer.append(TEXT_14);
+ stringBuffer.append(importManager.getImportedName(genPackage.getQualifiedFactoryInterfaceName()));
+ stringBuffer.append(TEXT_15);
+ stringBuffer.append(genClass.getName());
+ stringBuffer.append(TEXT_16);
+ if (genDiagram.isSameFileForDiagramAndModel()) {
+ stringBuffer.append(TEXT_17);
+ } else {
+ stringBuffer.append(TEXT_18);
+ stringBuffer.append(genPackage.getPrefix().toLowerCase());
+ stringBuffer.append(TEXT_19);
+ }
+ stringBuffer.append(TEXT_20);
+ for (Iterator i = genModel.getAllGenPackagesWithClassifiers().iterator(); i.hasNext(); ) {
+ GenPackage aGenPackage = (GenPackage)i.next();
+ if (aGenPackage.getGenModel().hasEditSupport()) {
+
+ stringBuffer.append(TEXT_21);
+ stringBuffer.append(importManager.getImportedName(aGenPackage.getQualifiedItemProviderAdapterFactoryClassName()));
+ stringBuffer.append(TEXT_22);
+ }
+ }
+ for (Iterator i = genModel.getAllUsedGenPackagesWithClassifiers().iterator(); i.hasNext(); ) {
+ GenPackage aGenPackage = (GenPackage)i.next();
+ if (aGenPackage.getGenModel().hasEditSupport()) {
+
+ stringBuffer.append(TEXT_23);
+ stringBuffer.append(importManager.getImportedName(aGenPackage.getQualifiedItemProviderAdapterFactoryClassName()));
+ stringBuffer.append(TEXT_24);
+ }
+ }
+ stringBuffer.append(TEXT_25);
+ importManager.emitSortedImports();
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/LinkEditPartGen.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/LinkEditPartGen.java
new file mode 100644
index 000000000..77facb3b7
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/LinkEditPartGen.java
@@ -0,0 +1,132 @@
+package org.eclipse.gmf.codegen.templates.diacanvas;
+
+import org.eclipse.gmf.codegen.gmfgen.*;
+import org.eclipse.emf.codegen.ecore.genmodel.*;
+import org.eclipse.gmf.codegen.util.ImportUtil;
+
+public class LinkEditPartGen
+{
+ protected static String nl;
+ public static synchronized LinkEditPartGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ LinkEditPartGen result = new LinkEditPartGen();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "package ";
+ protected final String TEXT_2 = ";";
+ protected final String TEXT_3 = NL + NL + "import org.eclipse.draw2d.*;" + NL + "import org.eclipse.emf.ecore.EAttribute;" + NL + "import org.eclipse.emf.ecore.EObject;" + NL + "import org.eclipse.gef.*;" + NL + "import org.eclipse.gef.commands.Command;" + NL + "import org.eclipse.gef.editparts.*;" + NL + "import org.eclipse.gef.editpolicies.*;" + NL + "import org.eclipse.gef.requests.DirectEditRequest;" + NL + "import org.eclipse.gef.requests.GroupRequest;" + NL + "import org.eclipse.gef.tools.DirectEditManager;" + NL + "import org.eclipse.gmf.diagramrt.DiagramLink;" + NL + "import org.eclipse.gmf.runtime.gef.DefaultDirectEditManager;" + NL + "import org.eclipse.gmf.runtime.gef.commands.ChangeDiagramElementNameCommand;" + NL + "import org.eclipse.gmf.runtime.gef.commands.DeleteDiagramLinkCommand;" + NL + "import org.eclipse.swt.graphics.Font;";
+ protected final String TEXT_4 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
+ protected final String TEXT_5 = " extends AbstractConnectionEditPart {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = ";
+ protected final String TEXT_6 = ";" + NL;
+ protected final String TEXT_7 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected DirectEditManager myManager;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate IFigure myLabelFigure;" + NL;
+ protected final String TEXT_8 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_9 = "(DiagramLink model) {" + NL + "\t\tsetModel(model);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {" + NL + "\t\tinstallEditPolicy(EditPolicy.CONNECTION_ENDPOINTS_ROLE, new ConnectionEndpointEditPolicy());" + NL + "\t\tinstallEditPolicy(EditPolicy.CONNECTION_ROLE, new ConnectionEditPolicy() {" + NL + "\t\t\tprotected Command getDeleteCommand(GroupRequest request) {" + NL + "\t\t\t\t// TODO perhaps, request.getEditParts().getModel()?" + NL + "\t\t\t\treturn new DeleteDiagramLinkCommand(getDiagramLink());" + NL + "\t\t\t}" + NL + "\t\t});";
+ protected final String TEXT_10 = NL + "\t\tinstallEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, createDirectEditPolicy());";
+ protected final String TEXT_11 = NL + "\t\t// installEditPolicy(EditPolicy.CONNECTION_BENDPOINTS_ROLE, new BendpointEditPolicy() {});" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure createFigure() {" + NL + "\t\tPolylineConnection conn = createConnectionFigure();";
+ protected final String TEXT_12 = NL + "\t\tconn.setLineStyle(Graphics.";
+ protected final String TEXT_13 = ");";
+ protected final String TEXT_14 = NL + "\t\tconn.setSourceDecoration(new ";
+ protected final String TEXT_15 = "()); ";
+ protected final String TEXT_16 = NL + "\t\tconn.setTargetDecoration(new ";
+ protected final String TEXT_17 = "()); ";
+ protected final String TEXT_18 = NL + "\t\tif (getDiagramLink().getForegroundColor() == null) {" + NL + "\t\t\t// set default color from genmodel" + NL + "\t\t\t// XXX no 'if' check? set color from genModel if any, and allow refreshColors to override later?" + NL + "\t\t\tconn.setForegroundColor(getColorSupport().get(\"";
+ protected final String TEXT_19 = "\"));" + NL + "\t\t}";
+ protected final String TEXT_20 = NL + "\t\tconn.add(getLabelFigure(), createLabelConstraint(conn));";
+ protected final String TEXT_21 = NL + "\t\trefreshColors(conn);" + NL + "\t\treturn conn;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected PolylineConnection createConnectionFigure() {" + NL + "\t\treturn new ";
+ protected final String TEXT_22 = "();" + NL + "\t}" + NL;
+ protected final String TEXT_23 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Object createLabelConstraint(Connection conn) {" + NL + "\t\tConnectionLocator cl = new ConnectionLocator(conn, ConnectionLocator.MIDDLE);" + NL + "\t\tcl.setRelativePosition(PositionConstants.NORTH_EAST);" + NL + "\t\tcl.setGap(2);" + NL + "\t\treturn cl;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected final IFigure getLabelFigure() {" + NL + "\t\tif (myLabelFigure == null) {" + NL + "\t\t\tmyLabelFigure = createLabelFigure();" + NL + "\t\t}" + NL + "\t\treturn myLabelFigure;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure createLabelFigure() {" + NL + "\t\treturn new Label(getLabelText());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelText() {" + NL + "\t\tEObject owner = getDiagramLink().getDomainModelElement();" + NL + "\t\tif (owner == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\treturn String.valueOf(owner.eGet(getLabelFeature()));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected EAttribute getLabelFeature() {";
+ protected final String TEXT_24 = NL + "\t\treturn ";
+ protected final String TEXT_25 = ".eINSTANCE.get";
+ protected final String TEXT_26 = "();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected EditPolicy createDirectEditPolicy() {" + NL + "\t\treturn new DirectEditPolicy() {" + NL + "\t\t\tprotected Command getDirectEditCommand(DirectEditRequest request) {" + NL + "\t\t\t\tEAttribute domainNameFeature = (EAttribute) request.getDirectEditFeature();" + NL + "\t\t\t\tif (domainNameFeature == null) {" + NL + "\t\t\t\t\tSystem.err.println(\"Someone passes DirectEditRequest without directEditFeature set\");" + NL + "\t\t\t\t\tdomainNameFeature = getLabelFeature();" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn new ChangeDiagramElementNameCommand(getDiagramLink(), domainNameFeature,(String) request.getCellEditor().getValue());" + NL + "\t\t\t}" + NL + "\t\t\tprotected void showCurrentEditValue(DirectEditRequest request) {" + NL + "\t\t\t\tIFigure fig = getLabelFigure();" + NL + "\t\t\t\tif (fig instanceof Label) {" + NL + "\t\t\t\t\t((Label)fig).setText((String)request.getCellEditor().getValue());" + NL + "\t\t\t\t\tfig.getUpdateManager().performUpdate();" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit() {" + NL + "\t\tif(myManager == null) {" + NL + "\t\t\tmyManager = new DefaultDirectEditManager(this, new DefaultDirectEditManager.DirectEditInfoProvider() {" + NL + "\t\t\t\tpublic Object getDirectEditFeature() {" + NL + "\t\t\t\t\treturn ";
+ protected final String TEXT_27 = ".eINSTANCE.get";
+ protected final String TEXT_28 = "();" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic String getInitialText() {" + NL + "\t\t\t\t\treturn String.valueOf(getDiagramLink().getDomainModelElement().eGet(getLabelFeature()));" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic IFigure getDirectEditFigure() {" + NL + "\t\t\t\t\treturn ";
+ protected final String TEXT_29 = ".this.getLabelFigure();" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic Font getTextFont() {" + NL + "\t\t\t\t\treturn getLabelFigure().getFont();" + NL + "\t\t\t\t}" + NL + "\t\t\t});" + NL + "\t\t}" + NL + "\t\tmyManager.show();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest(Request request) {" + NL + "\t\tif (request.getType() == RequestConstants.REQ_DIRECT_EDIT) {" + NL + "\t\t\tperformDirectEdit();" + NL + "\t\t} else {" + NL + "\t\t\tsuper.performRequest(request);" + NL + "\t\t}" + NL + "\t}";
+ protected final String TEXT_30 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\t// FIXME placeholder for attaching listener to model object, e.g.:" + NL + "\t\t// ((Notifier) getModel()).eAdapters().add(myListener)" + NL + "\t\t// perhaps, for perfomance reasons it's better to have single listener" + NL + "\t\t// (e.g. diagram attaches one to domain model) and then request updates" + NL + "\t\t// of editParts (as maping of model element to edit part is known to diagram)" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic DiagramLink getDiagramLink() {" + NL + "\t\treturn (DiagramLink) getModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\trefreshColors(getFigure());" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshColors(IFigure fig) {" + NL + "\t\tif (getDiagramLink().getForegroundColor() != null) {" + NL + "\t\t\tfig.setForegroundColor(getColorSupport().get(getDiagramLink().getForegroundColor()));" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
+ protected final String TEXT_31 = " getColorSupport() {" + NL + "\t\treturn ((";
+ protected final String TEXT_32 = ") getRoot().getContents()).getColorSupport();" + NL + "\t}" + NL + "}";
+
+ public String generate(Object argument)
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+ GenLink genLink = (GenLink) argument;
+ GenDiagram genDiagram = genLink.getDiagram();
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(genDiagram.getEditPartsPackageName());
+ stringBuffer.append(TEXT_2);
+ ImportUtil importManager = new ImportUtil(genDiagram.getEditPartsPackageName());
+ stringBuffer.append(TEXT_3);
+ importManager.markImportLocation(stringBuffer);
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(genLink.getEditPartClassName());
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(genLink.getVisualID());
+ stringBuffer.append(TEXT_6);
+ if (genLink.hasNameToEdit()) {
+ stringBuffer.append(TEXT_7);
+ }
+ stringBuffer.append(TEXT_8);
+ stringBuffer.append(genLink.getEditPartClassName());
+ stringBuffer.append(TEXT_9);
+ if (genLink.hasNameToEdit()) {
+ stringBuffer.append(TEXT_10);
+ }
+ stringBuffer.append(TEXT_11);
+ if (genLink.getLineStyle() != null) {
+ stringBuffer.append(TEXT_12);
+ stringBuffer.append(genLink.getLineStyle());
+ stringBuffer.append(TEXT_13);
+
+}
+if (genLink.getSourceDecorationFigureQualifiedClassName() != null && genLink.getSourceDecorationFigureQualifiedClassName().trim().length() != 0) {
+ stringBuffer.append(TEXT_14);
+ stringBuffer.append(importManager.getImportedName(genLink.getSourceDecorationFigureQualifiedClassName()));
+ stringBuffer.append(TEXT_15);
+
+}
+if (genLink.getTargetDecorationFigureQualifiedClassName() != null && genLink.getTargetDecorationFigureQualifiedClassName().trim().length() != 0) {
+ stringBuffer.append(TEXT_16);
+ stringBuffer.append(importManager.getImportedName(genLink.getTargetDecorationFigureQualifiedClassName()));
+ stringBuffer.append(TEXT_17);
+ }
+ if (genLink.getForegroundColor() != null) {
+ stringBuffer.append(TEXT_18);
+ stringBuffer.append(genLink.getForegroundColor());
+ stringBuffer.append(TEXT_19);
+ }
+ if (genLink.hasNameToEdit()) {
+ stringBuffer.append(TEXT_20);
+ }
+ stringBuffer.append(TEXT_21);
+ stringBuffer.append(importManager.getImportedName(genLink.getFigureQualifiedClassName()));
+ stringBuffer.append(TEXT_22);
+ if (genLink.hasNameToEdit()) {
+ stringBuffer.append(TEXT_23);
+
+final GenFeature genFeature = genDiagram.findGenFeature(genLink.getDomainNameFeature());
+final String metaPackageInterfaceName = importManager.getImportedName(genFeature.getGenPackage().getQualifiedPackageInterfaceName());
+
+ stringBuffer.append(TEXT_24);
+ stringBuffer.append(metaPackageInterfaceName);
+ stringBuffer.append(TEXT_25);
+ stringBuffer.append(genFeature.getFeatureAccessorName());
+ stringBuffer.append(TEXT_26);
+ stringBuffer.append(metaPackageInterfaceName);
+ stringBuffer.append(TEXT_27);
+ stringBuffer.append(genFeature.getFeatureAccessorName());
+ stringBuffer.append(TEXT_28);
+ stringBuffer.append(genLink.getEditPartClassName());
+ stringBuffer.append(TEXT_29);
+ }
+ stringBuffer.append(TEXT_30);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.gef.ColorSupport"));
+ stringBuffer.append(TEXT_31);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_32);
+ importManager.emitSortedImports();
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/NodeEditPartGen.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/NodeEditPartGen.java
new file mode 100644
index 000000000..9d4ae0cab
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/NodeEditPartGen.java
@@ -0,0 +1,222 @@
+package org.eclipse.gmf.codegen.templates.diacanvas;
+
+import org.eclipse.gmf.codegen.gmfgen.*;
+import org.eclipse.emf.codegen.ecore.genmodel.*;
+import java.util.*;
+import org.eclipse.gmf.codegen.util.ImportUtil;
+
+public class NodeEditPartGen
+{
+ protected static String nl;
+ public static synchronized NodeEditPartGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ NodeEditPartGen result = new NodeEditPartGen();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "package ";
+ protected final String TEXT_2 = ";";
+ protected final String TEXT_3 = NL + NL + "import java.util.*;" + NL + "import org.eclipse.draw2d.*;" + NL + "import org.eclipse.emf.edit.domain.*;" + NL + "import org.eclipse.emf.edit.provider.IItemLabelProvider;" + NL + "import org.eclipse.emf.ecore.EAttribute;" + NL + "import org.eclipse.gef.*;" + NL + "import org.eclipse.gef.commands.*;" + NL + "import org.eclipse.gef.editparts.*;" + NL + "import org.eclipse.gef.editpolicies.*;" + NL + "import org.eclipse.gef.requests.*;" + NL + "import org.eclipse.gef.tools.*;";
+ protected final String TEXT_4 = NL + "import org.eclipse.gmf.runtime.gef.DefaultDirectEditManager;" + NL + "import org.eclipse.gmf.runtime.gef.CompartmentsContentPane;" + NL + "import org.eclipse.gmf.runtime.gef.commands.ChangeDiagramElementNameCommand;" + NL + "import org.eclipse.gmf.runtime.gef.commands.CreateChildNodeCommand;" + NL + "import org.eclipse.gmf.runtime.gef.commands.CreateDiagramLinkCommand;" + NL + "import org.eclipse.gmf.runtime.gef.commands.DeleteDiagramNodeCommand;" + NL + "import org.eclipse.gmf.runtime.update.UpdatablePart;" + NL + "import org.eclipse.swt.graphics.Image;" + NL + "import org.eclipse.swt.graphics.Font;";
+ protected final String TEXT_5 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
+ protected final String TEXT_6 = " extends AbstractGraphicalEditPart implements org.eclipse.gef.NodeEditPart, UpdatablePart {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = ";
+ protected final String TEXT_7 = ";";
+ protected final String TEXT_8 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected DirectEditManager myManager;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate IFigure myDirectEditFigure;";
+ protected final String TEXT_9 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate CompartmentsContentPane myContentPane;";
+ protected final String TEXT_10 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ConnectionAnchor myAnchor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_11 = "(DiagramNode model) {" + NL + "\t\tsetModel(model);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {" + NL + "\t\t// super.createEditPolicies();" + NL + "\t\tinstallEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutPolicy());" + NL + "\t\tinstallEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, createGraphicalNodePolicy());" + NL + "\t\tinstallEditPolicy(EditPolicy.COMPONENT_ROLE, createComponentPolicy());";
+ protected final String TEXT_12 = NL + "\t\tinstallEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, createDirectEditPolicy());";
+ protected final String TEXT_13 = NL + "\t\tinstallEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, createSelectionFeedbackPolicy());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected EditPolicy createSelectionFeedbackPolicy() {" + NL + "\t\treturn new ResizableEditPolicy() {" + NL + "\t\t\tprotected IFigure createDragSourceFeedbackFigure() {" + NL + "\t\t\t\tIFigure feedback = super.createDragSourceFeedbackFigure();" + NL + "\t\t\t\tfeedback.setForegroundColor(ColorConstants.darkGray);" + NL + "\t\t\t\treturn feedback;" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected EditPolicy createComponentPolicy() {" + NL + "\t\treturn new ComponentEditPolicy() {" + NL + "\t\t\tprotected Command createDeleteCommand(GroupRequest deleteRequest) {" + NL + "\t\t\t\t// FIXME deleteRequest is GroupRequest. Should I respect editPart(s!) from request" + NL + "\t\t\t\t// rather then taking model of this editPart?" + NL + "\t\t\t\tif (deleteRequest.getEditParts().size() != 1 && deleteRequest.getEditParts().get(0) != getDiagramNode()) {" + NL + "\t\t\t\t\tSystem.err.println(\"WARNING: needs fix!\");" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn new DeleteDiagramNodeCommand(getDiagramNode());" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected EditPolicy createLayoutPolicy() {" + NL + "\t\treturn new LayoutEditPolicy() {" + NL + "\t\t\tprotected EditPolicy createChildEditPolicy(EditPart child) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command getCreateCommand(CreateRequest request) {" + NL + "\t\t\t\tif (request.getNewObjectType() != ChildNode.class) {" + NL + "\t\t\t\t\treturn null;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tChildNode childNode = (ChildNode) request.getNewObject();" + NL + "\t\t\t\t// FIXME get feature from compartment definition, GenChildContainer.childFeatures" + NL + "\t\t\t\t// foreach (cn : genNode.childNode)" + NL + "\t\t\t\t// if cn.getDomainMetaClass == childNode.getDomainElement().eClass()) feature = cn.childFeature" + NL + "\t\t\t\treturn new CreateChildNodeCommand(childNode, getDiagramNode());" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command getDeleteDependantCommand(Request request) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command getMoveChildrenCommand(Request request) {" + NL + "\t\t\t\treturn UnexecutableCommand.INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\tprotected void showLayoutTargetFeedback(Request request) {" + NL + "\t\t\t\tif (myLayoutFeedback != null) {" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tmyLayoutFeedback = createLayoutFeedback();" + NL + "\t\t\t\taddFeedback(myLayoutFeedback);" + NL + "\t\t\t}" + NL + "\t\t\tprotected void eraseLayoutTargetFeedback(Request request) {" + NL + "\t\t\t\tremoveFeedback(myLayoutFeedback);" + NL + "\t\t\t\tmyLayoutFeedback = null;" + NL + "\t\t\t}" + NL + "\t\t\tprivate IFigure createLayoutFeedback() {" + NL + "\t\t\t\tRectangleFigure result = new RectangleFigure();" + NL + "\t\t\t\tresult.setFill(false);" + NL + "\t\t\t\tresult.setBounds(getHostFigure().getBounds().getExpanded(5, 5));" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t\tprivate IFigure myLayoutFeedback;" + NL + "\t\t};" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected EditPolicy createGraphicalNodePolicy() {" + NL + "\t\treturn new GraphicalNodeEditPolicy() {" + NL + "\t\t\tprotected Command getConnectionCompleteCommand(CreateConnectionRequest request) {" + NL + "\t\t\t\tCreateDiagramLinkCommand cmd = (CreateDiagramLinkCommand) request.getStartCommand();" + NL + "\t\t\t\tcmd.setTargetNode(getDiagramNode());" + NL + "\t\t\t\treturn cmd;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command getConnectionCreateCommand(CreateConnectionRequest request) {" + NL + "\t\t\t\tif (request.getNewObjectType() != DiagramLink.class) {" + NL + "\t\t\t\t\treturn null;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tDiagramLink diagramLink = (DiagramLink) request.getNewObject();" + NL + "\t\t\t\tCommand cmd = new CreateDiagramLinkCommand(diagramLink, getDiagramNode());" + NL + "\t\t\t\trequest.setStartCommand(cmd);" + NL + "\t\t\t\treturn cmd;" + NL + "\t\t\t\t// The disallow cursor will be shown IFF you return null" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command getReconnectSourceCommand(ReconnectRequest request) {" + NL + "\t\t\t\treturn null; // TODO" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command getReconnectTargetCommand(ReconnectRequest request) {" + NL + "\t\t\t\treturn null; // TODO" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure createFigure() {";
+ protected final String TEXT_14 = NL + "\t\tIFigure r = ";
+ protected final String TEXT_15 = ".create(\"";
+ protected final String TEXT_16 = "\", \"";
+ protected final String TEXT_17 = "\");";
+ protected final String TEXT_18 = NL + "\t\tRoundedRectangle r = new RoundedRectangle() {";
+ protected final String TEXT_19 = NL + "\t\tRectangleFigure r = new RectangleFigure() {";
+ protected final String TEXT_20 = NL + "\t\tEllipse r = new Ellipse() {";
+ protected final String TEXT_21 = NL + "\t\tTriangle r = new Triangle() {";
+ protected final String TEXT_22 = NL + "\t\t\tprotected void fillShape(Graphics graphics) {" + NL + "\t\t\t\tgraphics.pushState();" + NL + "\t\t\t\tgraphics.setForegroundColor(getColorSupport().get(\"130,245,255\")); //88, 210, 245" + NL + "\t\t\t\tgraphics.fillGradient(getBounds(), true);" + NL + "\t\t\t\tgraphics.popState();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tr.setLineWidth(2);";
+ protected final String TEXT_23 = NL + "\t\tLabel r = new Label();";
+ protected final String TEXT_24 = NL + "\t\tr.setLocation(getDiagramNode().getLocation());" + NL + "\t\tif (getDiagramNode().getSize().isEmpty()) {" + NL + "\t\t\tr.setSize(100, 50);" + NL + "\t\t} else {" + NL + "\t\t\tr.setSize(getDiagramNode().getSize());" + NL + "\t\t}" + NL + "\t\tr.setBorder(new MarginBorder(0, 5, 0, 5));";
+ protected final String TEXT_25 = NL + "\t\tif (getDiagramNode().getForegroundColor() == null) {" + NL + "\t\t\t// set default color, defined in genmodel" + NL + "\t\t\tr.setForegroundColor(getColorSupport().get(\"";
+ protected final String TEXT_26 = "\"));" + NL + "\t\t}";
+ protected final String TEXT_27 = NL + "\t\tif (getDiagramNode().getBackgroundColor() == null) {" + NL + "\t\t\tr.setBackgroundColor(getColorSupport().get(\"";
+ protected final String TEXT_28 = "\"));" + NL + "\t\t}";
+ protected final String TEXT_29 = NL + "\t\trefreshColors(r);";
+ protected final String TEXT_30 = NL + "\t\tr.setLayoutManager(new ToolbarLayout());";
+ protected final String TEXT_31 = NL + "\t\tLabel stereotypes = new Label();";
+ protected final String TEXT_32 = NL + "\t\tstereotypes.setText(\"";
+ protected final String TEXT_33 = "\");" + NL + "\t\tstereotypes.setFont(";
+ protected final String TEXT_34 = ".getFontRegistry().getItalic(JFaceResources.TEXT_FONT));" + NL + "\t\tr.add(stereotypes);";
+ protected final String TEXT_35 = NL + "\t\tr.add(getDirectEditFigure());";
+ protected final String TEXT_36 = NL + "\t\t// XXX actually, content pane should be added with some constraint, " + NL + "\t\t// not necessarily as the last figure. " + NL + "\t\tmyContentPane = createContentPane();" + NL + "\t\tr.add(myContentPane);";
+ protected final String TEXT_37 = NL + "\t\treturn r;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic DiagramNode getDiagramNode() {" + NL + "\t\treturn (DiagramNode) getModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tvisualPropertiesChanged();" + NL + "\t\tboundsChanged();" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t}" + NL + "" + NL + "\t// XXX TODO? introduce ChangeColorRequest() with appropriate command to handle? With EditPolicy/handleRequest?" + NL + "\t// (+) undo, unified, (-) nothing, really." + NL + "\t// ??? Request/policy? Enough to have command?" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshColors(IFigure fig) {" + NL + "\t\tif (getDiagramNode().getForegroundColor() != null) {" + NL + "\t\t\tfig.setForegroundColor(getColorSupport().get(getDiagramNode().getForegroundColor()));" + NL + "\t\t}" + NL + "\t\tif (getDiagramNode().getBackgroundColor() != null) {" + NL + "\t\t\tfig.setBackgroundColor(getColorSupport().get(getDiagramNode().getBackgroundColor()));" + NL + "\t\t}" + NL + "\t}";
+ protected final String TEXT_38 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelChildren() {" + NL + "\t\treturn getDiagramNode().getChildNodes();" + NL + "\t}";
+ protected final String TEXT_39 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected CompartmentsContentPane createContentPane() {" + NL + "\t\tCompartmentsContentPane contentPane = new CompartmentsContentPane();" + NL + "\t\t// if (genNode.childContainersPlacement == TOOLBAR) {" + NL + "\t\tcontentPane.setLayoutManager(new ToolbarLayout());" + NL + "\t\t// } else {" + NL + "\t\t//contentPane.setLayoutManager(new FlowLayout());" + NL + "\t\t//}" + NL + "\t\tIFigure compartment;";
+ protected final String TEXT_40 = NL + "\t\tcompartment = createCompartment(\"";
+ protected final String TEXT_41 = "\");" + NL + "\t\t" + NL + "\t\t// if childContainer.needsLabel() {" + NL + "\t\t// compartment.setLabel(childContainer.titleKey);" + NL + "\t\t//}" + NL + "\t\t// compartment.setCollapse(childContainer.canCollapse);" + NL + "\t\t// compartment.setHideEmpty(childContainer.hideIfEmpty);" + NL + "\t\t// switch (compartment.layoutKind)" + NL + "\t\tcompartment.setLayoutManager(new ToolbarLayout());" + NL + "\t\tcontentPane.register(\"";
+ protected final String TEXT_42 = "\", compartment);";
+ protected final String TEXT_43 = NL + "\t\treturn contentPane;" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure createCompartment(String title) {" + NL + "\t\tLabeledContainer r = new LabeledContainer();" + NL + "\t\tr.setLabel(title);" + NL + "\t\tr.setOpaque(false);" + NL + "\t\treturn r;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual(EditPart childEditPart, int index) {" + NL + "\t\tChildNode model = (ChildNode) childEditPart.getModel();" + NL + "\t\tIFigure child = ((GraphicalEditPart)childEditPart).getFigure();" + NL + "\t\tmyContentPane.addChildVisual(model.getGroupID(), child, index);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeChildVisual(EditPart childEditPart) {" + NL + "\t\tChildNode model = (ChildNode) childEditPart.getModel();" + NL + "\t\tIFigure child = ((GraphicalEditPart)childEditPart).getFigure();" + NL + "\t\tmyContentPane.removeChildVisual(model.getGroupID(), child);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IFigure getContentPane() {" + NL + "\t\treturn myContentPane;" + NL + "\t}";
+ protected final String TEXT_44 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelSourceConnections() {" + NL + "\t\treturn getDiagramNode().getOutgoingLinks();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelTargetConnections() {" + NL + "\t\treturn getDiagramNode().getIncomingLinks();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void boundsChanged() {" + NL + "\t\tgetFigure().setLocation(getDiagramNode().getLocation());" + NL + "\t\tgetFigure().setSize(getDiagramNode().getSize());" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void visualPropertiesChanged() {" + NL + "\t\trefreshColors(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void structuralPropertiesChanged() {" + NL + "\t\trefreshChildren();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void incomingLinksChanged() {" + NL + "\t\trefreshTargetConnections();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void outgoingLinksChanged() {" + NL + "\t\trefreshSourceConnections();" + NL + "\t}" + NL;
+ protected final String TEXT_45 = NL;
+ protected final String TEXT_46 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure createDirectEditFigure() {" + NL + "\t\t// FIXME reuse getInitialText" + NL + "\t\treturn new Label(String.valueOf(getDiagramNode().getDomainModelElement().eGet(getDefaultNameFeature())), getImage());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Image getImage() {" + NL + "\t\tEditingDomain ed = AdapterFactoryEditingDomain.getEditingDomainFor(getDiagramNode().getDomainModelElement());" + NL + "\t\t// XXX it's our way to get adapter factory without initializing it right here. Is there better way?" + NL + "\t\tif (ed instanceof AdapterFactoryEditingDomain) {" + NL + "\t\t\tIItemLabelProvider labelProvider = (IItemLabelProvider) ((AdapterFactoryEditingDomain) ed).getAdapterFactory().adapt(getDiagramNode().getDomainModelElement(), IItemLabelProvider.class);" + NL + "\t\t\tif (labelProvider != null) {" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_47 = ".getInstance().getImage(labelProvider.getImage(getDiagramNode().getDomainModelElement()));" + NL + "\t\t\t}" + NL + "\t\t\t// else fall through" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure getDirectEditFigure() {" + NL + "\t\tif (myDirectEditFigure == null) {" + NL + "\t\t\tmyDirectEditFigure = createDirectEditFigure();" + NL + "\t\t}" + NL + "\t\treturn myDirectEditFigure;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected EditPolicy createDirectEditPolicy() {" + NL + "\t\treturn new DirectEditPolicy() {" + NL + "\t\t\tprotected Command getDirectEditCommand(DirectEditRequest request) {" + NL + "\t\t\t\tEAttribute domainNameFeature = (EAttribute) request.getDirectEditFeature();" + NL + "\t\t\t\tif (domainNameFeature == null) {" + NL + "\t\t\t\t\tSystem.err.println(\"Someone passes DirectEditRequest without directEditFeature set\");" + NL + "\t\t\t\t\tdomainNameFeature = getDefaultNameFeature();" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn new ChangeDiagramElementNameCommand(getDiagramNode(), domainNameFeature,(String) request.getCellEditor().getValue());" + NL + "\t\t\t}" + NL + "\t\t\tprotected void showCurrentEditValue(DirectEditRequest request) {" + NL + "\t\t\t\tIFigure fig = getDirectEditFigure();" + NL + "\t\t\t\tif (fig instanceof Label) {" + NL + "\t\t\t\t\t((Label)fig).setText((String)request.getCellEditor().getValue());" + NL + "\t\t\t\t\tfig.getUpdateManager().performUpdate();" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit() {" + NL + "\t\tif(myManager == null) {" + NL + "\t\t\tmyManager = new DefaultDirectEditManager(this, new DefaultDirectEditManager.DirectEditInfoProvider() {" + NL + "\t\t\t\tpublic Object getDirectEditFeature() {" + NL + "\t\t\t\t\treturn ";
+ protected final String TEXT_48 = ".eINSTANCE.get";
+ protected final String TEXT_49 = "();" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic String getInitialText() {" + NL + "\t\t\t\t\treturn String.valueOf(getDiagramNode().getDomainModelElement().eGet((EAttribute) getDirectEditFeature()));" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic IFigure getDirectEditFigure() {" + NL + "\t\t\t\t\treturn ";
+ protected final String TEXT_50 = ".this.getDirectEditFigure();" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic Font getTextFont() {" + NL + "\t\t\t\t\treturn getDirectEditFigure().getFont();" + NL + "\t\t\t\t}" + NL + "\t\t\t});" + NL + "\t\t}" + NL + "\t\tmyManager.show();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest(Request request) {" + NL + "\t\tif (request.getType() == RequestConstants.REQ_DIRECT_EDIT) {" + NL + "\t\t\tperformDirectEdit();" + NL + "\t\t} else {" + NL + "\t\t\tsuper.performRequest(request);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected EAttribute getDefaultNameFeature() {" + NL + "\t\treturn ";
+ protected final String TEXT_51 = ".eINSTANCE.get";
+ protected final String TEXT_52 = "();" + NL + "\t}";
+ protected final String TEXT_53 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart arg0) {" + NL + "\t\treturn getAnchor();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart arg0) {" + NL + "\t\treturn getAnchor();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ConnectionAnchor getSourceConnectionAnchor(Request arg0) {" + NL + "\t\treturn getAnchor();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ConnectionAnchor getTargetConnectionAnchor(Request arg0) {" + NL + "\t\treturn getAnchor();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_54 = " getColorSupport() {" + NL + "\t\treturn ((";
+ protected final String TEXT_55 = ") getRoot().getContents()).getColorSupport();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ConnectionAnchor getAnchor() {" + NL + "\t\tif (myAnchor == null) {" + NL + "\t\t\tmyAnchor = new ChopboxAnchor(getFigure());" + NL + "\t\t}" + NL + "\t\treturn myAnchor;" + NL + "\t}" + NL + "}";
+
+ public String generate(Object argument)
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+
+GenNode genNode = (GenNode) argument;
+GenDiagram genDiagram = genNode.getDiagram();
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(genDiagram.getEditPartsPackageName());
+ stringBuffer.append(TEXT_2);
+ ImportUtil importManager = new ImportUtil(genDiagram.getEditPartsPackageName());
+ stringBuffer.append(TEXT_3);
+ importManager.addImport("org.eclipse.gmf.diagramrt.*");
+ stringBuffer.append(TEXT_4);
+ importManager.markImportLocation(stringBuffer);
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(genNode.getEditPartClassName());
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append(genNode.getVisualID());
+ stringBuffer.append(TEXT_7);
+ if (genNode.hasNameToEdit()) {
+ stringBuffer.append(TEXT_8);
+ }
+ if (!genNode.getChildContainers().isEmpty()) {
+ stringBuffer.append(TEXT_9);
+ }
+ stringBuffer.append(TEXT_10);
+ stringBuffer.append(genNode.getEditPartClassName());
+ stringBuffer.append(TEXT_11);
+ if (genNode.hasNameToEdit()) {
+ stringBuffer.append(TEXT_12);
+ }
+ stringBuffer.append(TEXT_13);
+ if (genNode.getViewmapURI() != null) {
+ stringBuffer.append(TEXT_14);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.diagramrt.gefsvg.SVGShapeFactory"));
+ stringBuffer.append(TEXT_15);
+ stringBuffer.append(genDiagram.getPluginID());
+ stringBuffer.append(TEXT_16);
+ stringBuffer.append(genNode.getViewmapURI());
+ stringBuffer.append(TEXT_17);
+ } else {
+ if (genNode.getNodeVisualizationKind() == 1) {
+ stringBuffer.append(TEXT_18);
+ }
+ if (genNode.getNodeVisualizationKind() == 2) {
+ stringBuffer.append(TEXT_19);
+ }
+ if (genNode.getNodeVisualizationKind() == 3) {
+ stringBuffer.append(TEXT_20);
+ }
+ if (genNode.getNodeVisualizationKind() == 4) {
+ stringBuffer.append(TEXT_21);
+ }
+ if (genNode.getNodeVisualizationKind() > 0 && genNode.getNodeVisualizationKind() < 5) {
+ stringBuffer.append(TEXT_22);
+ }
+ if (genNode.getNodeVisualizationKind() == 5) {
+ stringBuffer.append(TEXT_23);
+ }
+ }
+ stringBuffer.append(TEXT_24);
+ if (genNode.getForegroundColor() != null) {
+ stringBuffer.append(TEXT_25);
+ stringBuffer.append(genNode.getForegroundColor());
+ stringBuffer.append(TEXT_26);
+ }
+ if (genNode.getBackgroundColor() != null) {
+ stringBuffer.append(TEXT_27);
+ stringBuffer.append(genNode.getBackgroundColor());
+ stringBuffer.append(TEXT_28);
+ }
+ stringBuffer.append(TEXT_29);
+ if (genNode.hasNameToEdit() || !genNode.getAffixedStereotypes().isEmpty()) {
+ stringBuffer.append(TEXT_30);
+ }
+ if (!genNode.getAffixedStereotypes().isEmpty()) {
+ stringBuffer.append(TEXT_31);
+
+StringBuffer sb = new StringBuffer();
+sb.append('<');
+for (Iterator it = genNode.getAffixedStereotypes().iterator(); it.hasNext();) {
+ sb.append(it.next());
+ sb.append(',');
+}
+sb.deleteCharAt(sb.length() - 1);
+sb.append('>');
+
+ stringBuffer.append(TEXT_32);
+ stringBuffer.append(sb.toString());
+ stringBuffer.append(TEXT_33);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.resource.JFaceResources"));
+ stringBuffer.append(TEXT_34);
+ }
+ if (genNode.hasNameToEdit()) {
+ stringBuffer.append(TEXT_35);
+ }
+ if (!genNode.getChildContainers().isEmpty()) {
+ stringBuffer.append(TEXT_36);
+ }
+ stringBuffer.append(TEXT_37);
+ if (!genNode.getChildNodes().isEmpty()) {
+ stringBuffer.append(TEXT_38);
+ }
+ if (!genNode.getChildContainers().isEmpty() /* production: && !genNode.getChildNodes().isEmpty()*/) {
+ stringBuffer.append(TEXT_39);
+ for (Iterator it = genNode.getChildContainers().iterator(); it.hasNext();) {
+ GenChildContainer childContainer = (GenChildContainer) it.next();
+
+ stringBuffer.append(TEXT_40);
+ stringBuffer.append(childContainer.getTitleKey());
+ stringBuffer.append(TEXT_41);
+ stringBuffer.append(childContainer.getGroupID());
+ stringBuffer.append(TEXT_42);
+ }
+ stringBuffer.append(TEXT_43);
+ }
+ stringBuffer.append(TEXT_44);
+ if (genNode.hasNameToEdit()) {
+ stringBuffer.append(TEXT_45);
+
+ GenFeature genFeature = genDiagram.findGenFeature(genNode.getDomainNameFeature());
+ String metaPackageInterfaceName = importManager.getImportedName(genFeature.getGenPackage().getQualifiedPackageInterfaceName());
+
+ stringBuffer.append(TEXT_46);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry"));
+ stringBuffer.append(TEXT_47);
+ stringBuffer.append(metaPackageInterfaceName);
+ stringBuffer.append(TEXT_48);
+ stringBuffer.append(genFeature.getFeatureAccessorName());
+ stringBuffer.append(TEXT_49);
+ stringBuffer.append(genNode.getEditPartClassName());
+ stringBuffer.append(TEXT_50);
+ stringBuffer.append(metaPackageInterfaceName);
+ stringBuffer.append(TEXT_51);
+ stringBuffer.append(genFeature.getFeatureAccessorName());
+ stringBuffer.append(TEXT_52);
+ }
+ stringBuffer.append(TEXT_53);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.gef.ColorSupport"));
+ stringBuffer.append(TEXT_54);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_55);
+ importManager.emitSortedImports();
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/PaletteGen.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/PaletteGen.java
new file mode 100644
index 000000000..038032d33
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/PaletteGen.java
@@ -0,0 +1,254 @@
+package org.eclipse.gmf.codegen.templates.diacanvas;
+
+import org.eclipse.gmf.codegen.gmfgen.*;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.codegen.ecore.genmodel.*;
+import java.util.*;
+import org.eclipse.gmf.codegen.util.ImportUtil;
+
+public class PaletteGen
+{
+ protected static String nl;
+ public static synchronized PaletteGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ PaletteGen result = new PaletteGen();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "package ";
+ protected final String TEXT_2 = ";";
+ protected final String TEXT_3 = NL + NL + "import org.eclipse.emf.common.notify.AdapterFactory;" + NL + "import org.eclipse.emf.edit.provider.IItemLabelProvider;" + NL + "import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;" + NL + "import org.eclipse.gef.palette.*;" + NL + "import org.eclipse.gef.requests.CreationFactory;" + NL + "import org.eclipse.jface.resource.*;";
+ protected final String TEXT_4 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
+ protected final String TEXT_5 = " {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final PaletteRoot myRoot = new PaletteRoot();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate final AdapterFactory myAdapterFactory;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
+ protected final String TEXT_6 = "(AdapterFactory adapterFactory) {" + NL + "\t\tmyAdapterFactory = adapterFactory;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate PaletteRoot getRoot() {" + NL + "\t\treturn myRoot;" + NL + "\t} " + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static PaletteRoot createPalette(AdapterFactory adapterFactory) {" + NL + "\t\t";
+ protected final String TEXT_7 = " factory = new ";
+ protected final String TEXT_8 = "(adapterFactory);" + NL + "\t\tfactory.setupCommonTools();" + NL;
+ protected final String TEXT_9 = NL + "\t\tfactory.createToolGroup";
+ protected final String TEXT_10 = "();";
+ protected final String TEXT_11 = NL + "\t\treturn factory.getRoot();" + NL + "\t}" + NL;
+ protected final String TEXT_12 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createToolGroup";
+ protected final String TEXT_13 = "() {" + NL + "\t\tPaletteContainer paletteContainer = createContainer(\"";
+ protected final String TEXT_14 = "\");" + NL + "\t\t// Nodes";
+ protected final String TEXT_15 = NL + "\t\tcreateNodeTool";
+ protected final String TEXT_16 = "(paletteContainer);";
+ protected final String TEXT_17 = NL + "\t\tpaletteContainer.add(new PaletteSeparator());" + NL + "\t\t// Links";
+ protected final String TEXT_18 = NL + "\t\tcreateLinkTool";
+ protected final String TEXT_19 = "(paletteContainer);";
+ protected final String TEXT_20 = NL + "\t\tgetRoot().add(paletteContainer);" + NL + "\t}";
+ protected final String TEXT_21 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void setupCommonTools() {";
+ protected final String TEXT_22 = NL;
+ protected final String TEXT_23 = "\t\tPaletteGroup common = new PaletteGroup(\"Common controls\");" + NL + "" + NL + "\t\tToolEntry selectionTool = new PanningSelectionToolEntry();" + NL + "\t\tcommon.add(selectionTool);" + NL + "\t\tcommon.add(new MarqueeToolEntry());" + NL + "" + NL + "\t\tgetRoot().setDefaultEntry(selectionTool);" + NL + "" + NL + "\t\tgetRoot().add(common);" + NL + "\t}" + NL;
+ protected final String TEXT_24 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createNodeTool";
+ protected final String TEXT_25 = "(PaletteContainer paletteContainer) {";
+ protected final String TEXT_26 = NL;
+ protected final String TEXT_27 = NL + "//\t\tImageDescriptor img = ImageDescriptor.createFromFile(";
+ protected final String TEXT_28 = ".class, \"";
+ protected final String TEXT_29 = "\");" + NL + "\t\tImageDescriptor img = getImage(";
+ protected final String TEXT_30 = ");" + NL + "\t\tCreationFactory creationFactory = new CreationFactory() {" + NL + "\t\t\tpublic Object getNewObject() {" + NL + "\t\t\t\t";
+ protected final String TEXT_31 = " diagramNode = ";
+ protected final String TEXT_32 = ".eINSTANCE.create";
+ protected final String TEXT_33 = "();" + NL + "\t\t\t\tdiagramNode.setDomainModelElement(";
+ protected final String TEXT_34 = ");" + NL + "\t\t\t\tdiagramNode.setVisualID(";
+ protected final String TEXT_35 = ".VISUAL_ID);";
+ protected final String TEXT_36 = NL + "\t\t\t\tdiagramNode.setGroupID(\"";
+ protected final String TEXT_37 = "\");";
+ protected final String TEXT_38 = NL + "\t\t\t\tinitialize(diagramNode);" + NL + "\t\t\t\treturn diagramNode;" + NL + "\t\t\t}" + NL + "\t\t\tpublic Object getObjectType() {";
+ protected final String TEXT_39 = NL + "\t\t\t\treturn ";
+ protected final String TEXT_40 = ".class;";
+ protected final String TEXT_41 = NL + "\t\t\t\treturn ";
+ protected final String TEXT_42 = ".class;";
+ protected final String TEXT_43 = NL + "\t\t\t}" + NL + "\t\t\tprivate void initialize(";
+ protected final String TEXT_44 = " diagramNode) {" + NL + "\t\t\t\t// place initialization code for attributes specific to your Diagram RunTime model here" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tpaletteContainer.add(new CreationToolEntry(\"";
+ protected final String TEXT_45 = "\", \"";
+ protected final String TEXT_46 = "\", creationFactory, img, img));" + NL + "\t}";
+ protected final String TEXT_47 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createLinkTool";
+ protected final String TEXT_48 = "(PaletteContainer paletteContainer) {";
+ protected final String TEXT_49 = NL;
+ protected final String TEXT_50 = NL + "\t\t//ImageDescriptor img = ImageDescriptor.createFromFile(";
+ protected final String TEXT_51 = ".class, \"";
+ protected final String TEXT_52 = "\");*/";
+ protected final String TEXT_53 = NL + "\t\tImageDescriptor img = getImage(";
+ protected final String TEXT_54 = ");" + NL + "\t\tCreationFactory creationFactory = new CreationFactory() {" + NL + "\t\t\tpublic Object getNewObject() {" + NL + "\t\t\t\t";
+ protected final String TEXT_55 = " diagramLink = ";
+ protected final String TEXT_56 = ".eINSTANCE.create";
+ protected final String TEXT_57 = "();" + NL + "\t\t\t\tdiagramLink.setVisualID(";
+ protected final String TEXT_58 = ".VISUAL_ID);" + NL + "\t\t\t\tdiagramLink.setDomainModelElement(";
+ protected final String TEXT_59 = ");" + NL + "\t\t\t\tinitialize(diagramLink);" + NL + "\t\t\t\treturn diagramLink;" + NL + "\t\t\t}" + NL + "\t\t\tpublic Object getObjectType() {" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_60 = ".class;" + NL + "\t\t\t}" + NL + "\t\t\tprivate void initialize(";
+ protected final String TEXT_61 = " diagramLink) {" + NL + "\t\t\t\t// place initialization code for attributes specific to your Diagram RunTime model here" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tpaletteContainer.add(new ConnectionCreationToolEntry(\"";
+ protected final String TEXT_62 = "\", \"";
+ protected final String TEXT_63 = "\", creationFactory, img, img));" + NL + "\t}";
+ protected final String TEXT_64 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate PaletteContainer createContainer(String title) {" + NL + "\t\treturn new PaletteDrawer(title);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ImageDescriptor getImage(Object o) {" + NL + "\t\tIItemLabelProvider labelProvider = (IItemLabelProvider) myAdapterFactory.adapt(o, IItemLabelProvider.class);" + NL + "\t\tif (labelProvider != null) {" + NL + "\t\t\treturn ExtendedImageRegistry.getInstance().getImageDescriptor(labelProvider.getImage(o));" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "}";
+
+ public String generate(Object argument)
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+ GenDiagram genDiagram = (GenDiagram) argument; Palette palette = genDiagram.getPalette();
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(palette.getPackageName());
+ stringBuffer.append(TEXT_2);
+ ImportUtil importManager = new ImportUtil(palette.getPackageName());
+ stringBuffer.append(TEXT_3);
+ importManager.addImport("org.eclipse.gmf.diagramrt.*");
+ importManager.markImportLocation(stringBuffer);
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(palette.getFactoryClassName());
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(palette.getFactoryClassName());
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append(palette.getFactoryClassName());
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append(palette.getFactoryClassName());
+ stringBuffer.append(TEXT_8);
+ for(int toolGroupIndex = 0; toolGroupIndex < palette.getGroups().size(); toolGroupIndex++) {
+ stringBuffer.append(TEXT_9);
+ stringBuffer.append(toolGroupIndex);
+ stringBuffer.append(TEXT_10);
+ }
+ stringBuffer.append(TEXT_11);
+
+ int toolGroupIndex = 0;
+ int nodeToolIndex = 0;
+ int linkToolIndex = 0;
+ for(Iterator it = palette.getGroups().iterator(); it.hasNext(); toolGroupIndex++) {
+ ToolGroup tg = (ToolGroup) it.next();
+
+ stringBuffer.append(TEXT_12);
+ stringBuffer.append(toolGroupIndex);
+ stringBuffer.append(TEXT_13);
+ stringBuffer.append(tg.getTitleKey());
+ stringBuffer.append(TEXT_14);
+ for (int i = tg.getNodeTools().size(); i > 0; i--, nodeToolIndex++) {
+ stringBuffer.append(TEXT_15);
+ stringBuffer.append(nodeToolIndex);
+ stringBuffer.append(TEXT_16);
+ }
+ stringBuffer.append(TEXT_17);
+ for (int i = tg.getLinkTools().size(); i > 0; i--, linkToolIndex++) {
+ stringBuffer.append(TEXT_18);
+ stringBuffer.append(linkToolIndex);
+ stringBuffer.append(TEXT_19);
+ }
+ stringBuffer.append(TEXT_20);
+ }
+ stringBuffer.append(TEXT_21);
+ stringBuffer.append(TEXT_22);
+ stringBuffer.append(TEXT_23);
+
+ // Move on and create methods called from createToolGroup
+ toolGroupIndex = 0;
+ nodeToolIndex = 0;
+ linkToolIndex = 0;
+for(Iterator it = palette.getGroups().iterator(); it.hasNext(); toolGroupIndex++) {
+ ToolGroup tg = (ToolGroup) it.next();
+ for (Iterator it2 = tg.getNodeTools().iterator(); it2.hasNext(); nodeToolIndex++) {
+ NodeEntry nodeEntry = (NodeEntry) it2.next();
+
+ stringBuffer.append(TEXT_24);
+ stringBuffer.append(nodeToolIndex);
+ stringBuffer.append(TEXT_25);
+ stringBuffer.append(TEXT_26);
+
+GenNode genNode = nodeEntry.getGenNode();
+GenClass genClass = genDiagram.findGenClass(genNode.getDomainMetaClass());
+GenClass drtClass = genNode.getDiagramRunTimeClass();
+final String domainElementInstanceCreationCode = importManager.getImportedName(genClass.getGenPackage().getQualifiedFactoryInterfaceName()) + ".eINSTANCE.create" + genClass.getName() + "()";
+
+ stringBuffer.append(TEXT_27);
+ stringBuffer.append(palette.getFactoryClassName());
+ stringBuffer.append(TEXT_28);
+ stringBuffer.append(nodeEntry.getSmallIconPath());
+ stringBuffer.append(TEXT_29);
+ stringBuffer.append(domainElementInstanceCreationCode);
+ stringBuffer.append(TEXT_30);
+ stringBuffer.append(importManager.getImportedName(drtClass.getQualifiedInterfaceName()));
+ stringBuffer.append(TEXT_31);
+ stringBuffer.append(importManager.getImportedName(drtClass.getGenPackage().getQualifiedFactoryInterfaceName()));
+ stringBuffer.append(TEXT_32);
+ stringBuffer.append(drtClass.getName());
+ stringBuffer.append(TEXT_33);
+ stringBuffer.append(domainElementInstanceCreationCode);
+ stringBuffer.append(TEXT_34);
+ stringBuffer.append(importManager.getImportedName(genNode.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_35);
+ if (genNode instanceof GenChildNode) {
+ stringBuffer.append(TEXT_36);
+ stringBuffer.append(((GenChildNode) genNode).getGroupID());
+ stringBuffer.append(TEXT_37);
+ }
+ stringBuffer.append(TEXT_38);
+ if (genNode instanceof GenChildNode) {
+ stringBuffer.append(TEXT_39);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.diagramrt.ChildNode"));
+ stringBuffer.append(TEXT_40);
+ } else {
+ stringBuffer.append(TEXT_41);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.diagramrt.DiagramNode"));
+ stringBuffer.append(TEXT_42);
+ }
+ stringBuffer.append(TEXT_43);
+ stringBuffer.append(importManager.getImportedName(drtClass.getQualifiedInterfaceName()));
+ stringBuffer.append(TEXT_44);
+ stringBuffer.append(nodeEntry.getTitleKey());
+ stringBuffer.append(TEXT_45);
+ stringBuffer.append(nodeEntry.getDescriptionKey());
+ stringBuffer.append(TEXT_46);
+ }
+ for (Iterator it2 = tg.getLinkTools().iterator(); it2.hasNext(); linkToolIndex++) {
+ LinkEntry linkEntry = (LinkEntry) it2.next();
+
+ stringBuffer.append(TEXT_47);
+ stringBuffer.append(linkToolIndex);
+ stringBuffer.append(TEXT_48);
+ stringBuffer.append(TEXT_49);
+
+GenLink genLink = linkEntry.getGenLink();
+GenClass drtClass = genLink.getDiagramRunTimeClass();
+
+ stringBuffer.append(TEXT_50);
+ stringBuffer.append(palette.getFactoryClassName());
+ stringBuffer.append(TEXT_51);
+ stringBuffer.append(linkEntry.getSmallIconPath());
+ stringBuffer.append(TEXT_52);
+
+final String domainElementInstanceCreationCode;
+if (genLink instanceof GenLinkWithClass) {
+ EClass domainMetaClass = ((GenLinkWithClass) genLink).getDomainMetaClass();
+ GenClass genClass = genDiagram.findGenClass(domainMetaClass);
+ domainElementInstanceCreationCode = importManager.getImportedName(genClass.getGenPackage().getQualifiedFactoryInterfaceName()) + ".eINSTANCE.create" + genClass.getName() + "()";
+} else {
+ // no dedicated metaclass for link, thus no creation code
+ domainElementInstanceCreationCode = "null";
+}
+
+ stringBuffer.append(TEXT_53);
+ stringBuffer.append(domainElementInstanceCreationCode );
+ stringBuffer.append(TEXT_54);
+ stringBuffer.append(importManager.getImportedName(drtClass.getQualifiedInterfaceName()));
+ stringBuffer.append(TEXT_55);
+ stringBuffer.append(importManager.getImportedName(drtClass.getGenPackage().getQualifiedFactoryInterfaceName()));
+ stringBuffer.append(TEXT_56);
+ stringBuffer.append(drtClass.getName());
+ stringBuffer.append(TEXT_57);
+ stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_58);
+ stringBuffer.append(domainElementInstanceCreationCode);
+ stringBuffer.append(TEXT_59);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.diagramrt.DiagramLink"));
+ stringBuffer.append(TEXT_60);
+ stringBuffer.append(importManager.getImportedName(drtClass.getQualifiedInterfaceName()));
+ stringBuffer.append(TEXT_61);
+ stringBuffer.append(linkEntry.getTitleKey());
+ stringBuffer.append(TEXT_62);
+ stringBuffer.append(linkEntry.getDescriptionKey());
+ stringBuffer.append(TEXT_63);
+ }
+}
+ stringBuffer.append(TEXT_64);
+ importManager.emitSortedImports();
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/PluginGen.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/PluginGen.java
new file mode 100644
index 000000000..c9b60b5d3
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/PluginGen.java
@@ -0,0 +1,49 @@
+package org.eclipse.gmf.codegen.templates.diacanvas;
+
+import org.eclipse.gmf.codegen.gmfgen.*;
+import org.eclipse.gmf.codegen.util.ImportUtil;
+
+public class PluginGen
+{
+ protected static String nl;
+ public static synchronized PluginGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ PluginGen result = new PluginGen();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "package ";
+ protected final String TEXT_2 = ";";
+ protected final String TEXT_3 = NL + NL + "import org.eclipse.ui.plugin.AbstractUIPlugin;" + NL + "import org.osgi.framework.BundleContext;" + NL;
+ protected final String TEXT_4 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
+ protected final String TEXT_5 = " extends AbstractUIPlugin {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static ";
+ protected final String TEXT_6 = " ourInstance;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_7 = "() {" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void start(BundleContext context) throws Exception {" + NL + "\t\tsuper.start(context);" + NL + "\t\tourInstance = this;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void stop(BundleContext context) throws Exception {" + NL + "\t\tourInstance = null;" + NL + "\t\tsuper.stop(context);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static ";
+ protected final String TEXT_8 = " getInstance() {" + NL + "\t\treturn ourInstance;" + NL + "\t}" + NL + "}";
+
+ public String generate(Object argument)
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+ GenDiagram genDiagram = (GenDiagram) argument;
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(genDiagram.getEditorPackageName());
+ stringBuffer.append(TEXT_2);
+ ImportUtil importManager = new ImportUtil(genDiagram.getEditPartsPackageName());
+ stringBuffer.append(TEXT_3);
+ importManager.markImportLocation(stringBuffer);
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(genDiagram.getPluginClassName());
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(genDiagram.getPluginClassName());
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append(genDiagram.getPluginClassName());
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append(genDiagram.getPluginClassName());
+ stringBuffer.append(TEXT_8);
+ importManager.emitSortedImports();
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/PluginXML.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/PluginXML.java
new file mode 100644
index 000000000..54af45d92
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/diacanvas/PluginXML.java
@@ -0,0 +1,104 @@
+package org.eclipse.gmf.codegen.templates.diacanvas;
+
+import org.eclipse.gmf.codegen.gmfgen.*;
+import org.eclipse.emf.codegen.ecore.genmodel.*;
+import java.util.*;
+
+public class PluginXML
+{
+ protected static String nl;
+ public static synchronized PluginXML create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ PluginXML result = new PluginXML();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + NL + "<?eclipse version=\"3.0\"?>" + NL + "<plugin" + NL + " name=\"";
+ protected final String TEXT_2 = "\"" + NL + " id=\"";
+ protected final String TEXT_3 = "\"" + NL + " version=\"1.0.0\"" + NL + " class=\"";
+ protected final String TEXT_4 = "\"" + NL + " provider-name = \"";
+ protected final String TEXT_5 = "\">" + NL + "" + NL + " <requires>" + NL + " <import plugin=\"org.eclipse.core.runtime\"/>" + NL + " <import plugin=\"org.eclipse.core.resources\"/>" + NL + " <import plugin=\"org.eclipse.jface\"/>" + NL + " <import plugin=\"org.eclipse.ui.ide\"/>" + NL + " <import plugin=\"org.eclipse.ui.views\"/>" + NL + " <import plugin=\"org.eclipse.ui.workbench\"/>" + NL + " <import plugin=\"org.eclipse.emf.ecore\"/>";
+ protected final String TEXT_6 = NL + " <import plugin=\"org.eclipse.emf.edit.ui\"/>" + NL + " <import plugin=\"org.eclipse.gef\" export=\"true\"/>" + NL + " <import plugin=\"";
+ protected final String TEXT_7 = "\" export=\"true\"/>" + NL + " <import plugin=\"org.eclipse.gmf.runtime.gef\"/>" + NL + " <import plugin=\"org.eclipse.gmf.edit\"/>" + NL + " <import plugin=\"";
+ protected final String TEXT_8 = "\" export=\"true\"/>";
+ protected final String TEXT_9 = NL + " <import plugin=\"";
+ protected final String TEXT_10 = "\" export=\"true\"/>";
+ protected final String TEXT_11 = NL + " <import plugin=\"";
+ protected final String TEXT_12 = "\" export=\"true\"/>";
+ protected final String TEXT_13 = NL + " </requires>" + NL + "" + NL + " <runtime>" + NL + " <library name=\"plugin.jar\">" + NL + " <export name=\"*\"/>" + NL + " </library>" + NL + " </runtime>" + NL + "" + NL + " <extension point=\"org.eclipse.ui.editors\">" + NL + " <editor " + NL + " id=\"";
+ protected final String TEXT_14 = "_EditorID\"" + NL + " name=\"Diagram Editor for ";
+ protected final String TEXT_15 = "\"" + NL + " icon=\"none\"" + NL + " extensions=\"";
+ protected final String TEXT_16 = "\"" + NL + " class=\"";
+ protected final String TEXT_17 = "\"" + NL + " contributorClass=\"org.eclipse.ui.part.EditorActionBarContributor\"/>" + NL + " " + NL + " </extension>" + NL + " <extension point=\"org.eclipse.ui.popupMenus\">" + NL + " <objectContribution" + NL + " adaptable=\"true\"" + NL + " id=\"";
+ protected final String TEXT_18 = ".ui.contribution1\"" + NL + " objectClass=\"org.eclipse.core.resources.IContainer\">" + NL + " <action" + NL + " label=\"Create empty ";
+ protected final String TEXT_19 = " diagram file\"" + NL + " class=\"org.eclipse.gmf.runtime.actions.NewDiagramAction\"" + NL + " menubarPath=\"additions\"" + NL + " defaultName=\"example1\"" + NL + " fileExtension=\"";
+ protected final String TEXT_20 = "\"" + NL + " rtModelNsURI=\"";
+ protected final String TEXT_21 = "\"" + NL + " enablesFor=\"1\"" + NL + " id=\"";
+ protected final String TEXT_22 = ".ui.newDiagramAction\">" + NL + " </action>" + NL + " </objectContribution>" + NL + " </extension>" + NL + " <extension point=\"org.eclipse.team.core.fileTypes\">" + NL + " <fileTypes" + NL + " type=\"text\"" + NL + " extension=\"";
+ protected final String TEXT_23 = "\">" + NL + " </fileTypes>" + NL + " </extension>" + NL + "</plugin>";
+
+ public String generate(Object argument)
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+ GenDiagram genDiagram = (GenDiagram) argument;
+ GenModel genModel = genDiagram.getEmfGenModel();
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(genDiagram.getPluginName());
+ stringBuffer.append(TEXT_2);
+ stringBuffer.append(genDiagram.getPluginID());
+ stringBuffer.append(TEXT_3);
+ stringBuffer.append(genDiagram.getPluginQualifiedClassName());
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(genDiagram.getProviderName());
+ stringBuffer.append(TEXT_5);
+
+ // XXX org.eclipse.emf.edit.ui is for ExtendedImageRegistry.
+ // FIXME move image registry to plugin class code
+
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append(genDiagram.getDiagramRunTimeClass().getGenModel().getModelPluginID());
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append(genModel.getModelPluginID());
+ stringBuffer.append(TEXT_8);
+ if (!genModel.sameModelEditProject()) {
+ stringBuffer.append(TEXT_9);
+ stringBuffer.append(genModel.getEditPluginID());
+ stringBuffer.append(TEXT_10);
+ }
+
+String[] requiredPlugins = genDiagram.getRequiredPluginIDs();
+if (requiredPlugins == null) {
+ requiredPlugins = new String[0];
+}
+for (Iterator it = Arrays.asList(requiredPlugins).iterator(); it.hasNext();) {
+ stringBuffer.append(TEXT_11);
+ stringBuffer.append(it.next());
+ stringBuffer.append(TEXT_12);
+ }
+ stringBuffer.append(TEXT_13);
+ stringBuffer.append(genDiagram.getEditorQualifiedClassName());
+ stringBuffer.append(TEXT_14);
+ stringBuffer.append(genModel.getModelName());
+ stringBuffer.append(TEXT_15);
+ stringBuffer.append(genDiagram.getDiagramFileExtension());
+ stringBuffer.append(TEXT_16);
+ stringBuffer.append(genDiagram.getEditorQualifiedClassName());
+ stringBuffer.append(TEXT_17);
+ stringBuffer.append(genDiagram.getPluginID());
+ stringBuffer.append(TEXT_18);
+ stringBuffer.append(genDiagram.getDiagramFileExtension());
+ stringBuffer.append(TEXT_19);
+ stringBuffer.append(genDiagram.getDiagramFileExtension());
+ stringBuffer.append(TEXT_20);
+ stringBuffer.append(genDiagram.getDiagramRunTimeClass().getGenPackage().getEcorePackage().getNsURI());
+ stringBuffer.append(TEXT_21);
+ stringBuffer.append(genDiagram.getPluginID());
+ stringBuffer.append(TEXT_22);
+ stringBuffer.append(genDiagram.getDiagramFileExtension());
+ stringBuffer.append(TEXT_23);
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/CanvasMetaInfoProviderGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/CanvasMetaInfoProviderGenerator.java
new file mode 100644
index 000000000..4ddc9b878
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/CanvasMetaInfoProviderGenerator.java
@@ -0,0 +1,41 @@
+package org.eclipse.gmf.codegen.templates.edit;
+
+import org.eclipse.gmf.codegen.gmfgen.*;
+import org.eclipse.gmf.codegen.util.ImportUtil;
+
+public class CanvasMetaInfoProviderGenerator
+{
+ protected static String nl;
+ public static synchronized CanvasMetaInfoProviderGenerator create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ CanvasMetaInfoProviderGenerator result = new CanvasMetaInfoProviderGenerator();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "package ";
+ protected final String TEXT_2 = ";";
+ protected final String TEXT_3 = NL + NL + "import org.eclipse.gmf.diagramrt.DiagramCanvas;" + NL + "import org.eclipse.gmf.edit.provider.CanvasMetaInfoProvider;" + NL + "import org.eclipse.gmf.edit.provider.MetaInfoProviderAdapter;";
+ protected final String TEXT_4 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
+ protected final String TEXT_5 = " extends MetaInfoProviderAdapter implements CanvasMetaInfoProvider {" + NL + "}";
+ protected final String TEXT_6 = NL;
+
+ public String generate(Object argument)
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+ GenDiagram genDiagram = (GenDiagram) argument;
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(genDiagram.getEditProvidersPackageName());
+ stringBuffer.append(TEXT_2);
+ ImportUtil importManager = new ImportUtil(genDiagram.getEditProvidersPackageName());
+ stringBuffer.append(TEXT_3);
+ importManager.markImportLocation(stringBuffer);
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(genDiagram.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(TEXT_6);
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/LinkMetaInfoProviderGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/LinkMetaInfoProviderGenerator.java
new file mode 100644
index 000000000..195d4e73a
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/LinkMetaInfoProviderGenerator.java
@@ -0,0 +1,77 @@
+package org.eclipse.gmf.codegen.templates.edit;
+
+import org.eclipse.gmf.codegen.gmfgen.*;
+import org.eclipse.emf.codegen.ecore.genmodel.*;
+import org.eclipse.gmf.codegen.util.ImportUtil;
+
+public class LinkMetaInfoProviderGenerator
+{
+ protected static String nl;
+ public static synchronized LinkMetaInfoProviderGenerator create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ LinkMetaInfoProviderGenerator result = new LinkMetaInfoProviderGenerator();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "package ";
+ protected final String TEXT_2 = ";";
+ protected final String TEXT_3 = NL + NL + "import org.eclipse.emf.ecore.EReference;" + NL + "import org.eclipse.emf.ecore.EStructuralFeature;" + NL + "import org.eclipse.gmf.diagramrt.DiagramLink;" + NL + "import org.eclipse.gmf.edit.provider.LinkMetaInfoProvider;" + NL + "import org.eclipse.gmf.edit.provider.MetaInfoProviderAdapter;";
+ protected final String TEXT_4 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
+ protected final String TEXT_5 = " extends MetaInfoProviderAdapter implements LinkMetaInfoProvider {" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EStructuralFeature getTargetFeature(DiagramLink diagramLink) {";
+ protected final String TEXT_6 = NL + "\t\treturn ";
+ protected final String TEXT_7 = ".eINSTANCE.get";
+ protected final String TEXT_8 = "();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EReference getContainmentFeature(DiagramLink diagramLink) {";
+ protected final String TEXT_9 = NL + "\t\treturn null;";
+ protected final String TEXT_10 = NL + "\t\treturn ";
+ protected final String TEXT_11 = ".eINSTANCE.get";
+ protected final String TEXT_12 = "();";
+ protected final String TEXT_13 = NL + "\t}" + NL + "}";
+ protected final String TEXT_14 = NL;
+ protected final String TEXT_15 = NL;
+
+ public String generate(Object argument)
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+ GenLink genLink = (GenLink) argument;
+ GenDiagram genDiagram = genLink.getDiagram();
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(genDiagram.getEditProvidersPackageName());
+ stringBuffer.append(TEXT_2);
+ ImportUtil importManager = new ImportUtil(genDiagram.getEditProvidersPackageName());
+ stringBuffer.append(TEXT_3);
+ importManager.markImportLocation(stringBuffer);
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(genLink.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_5);
+
+GenFeature genFeature1 = genDiagram.findGenFeature(genLink.getDomainLinkTargetFeature());
+String metaPackageInterfaceName1 = importManager.getImportedName(genFeature1.getGenPackage().getQualifiedPackageInterfaceName());
+
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append(metaPackageInterfaceName1);
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append(genFeature1.getFeatureAccessorName());
+ stringBuffer.append(TEXT_8);
+
+if (genLink.getContainmentMetaFeature() == null) {
+ stringBuffer.append(TEXT_9);
+ } else {
+GenFeature genFeature2 = genDiagram.findGenFeature(genLink.getContainmentMetaFeature());
+String metaPackageInterfaceName2 = importManager.getImportedName(genFeature2.getGenPackage().getQualifiedPackageInterfaceName());
+
+ stringBuffer.append(TEXT_10);
+ stringBuffer.append(metaPackageInterfaceName2);
+ stringBuffer.append(TEXT_11);
+ stringBuffer.append(genFeature2.getFeatureAccessorName());
+ stringBuffer.append(TEXT_12);
+ }
+ stringBuffer.append(TEXT_13);
+ importManager.emitSortedImports();
+ stringBuffer.append(TEXT_14);
+ stringBuffer.append(TEXT_15);
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/MetaInfoProviderAdapterFactory1Generator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/MetaInfoProviderAdapterFactory1Generator.java
new file mode 100644
index 000000000..02bc07964
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/MetaInfoProviderAdapterFactory1Generator.java
@@ -0,0 +1,117 @@
+package org.eclipse.gmf.codegen.templates.edit;
+
+import org.eclipse.gmf.codegen.gmfgen.*;
+import org.eclipse.gmf.codegen.util.ImportUtil;
+import java.util.*;
+
+public class MetaInfoProviderAdapterFactory1Generator
+{
+ protected static String nl;
+ public static synchronized MetaInfoProviderAdapterFactory1Generator create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ MetaInfoProviderAdapterFactory1Generator result = new MetaInfoProviderAdapterFactory1Generator();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "package ";
+ protected final String TEXT_2 = ";";
+ protected final String TEXT_3 = NL + NL + "import org.eclipse.emf.common.notify.Adapter;" + NL + "import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;" + NL + "import org.eclipse.emf.edit.provider.ComposedAdapterFactory;" + NL + "import org.eclipse.emf.edit.provider.IDisposable;" + NL + "import org.eclipse.gmf.diagramrt.DiagramCanvas;" + NL + "import org.eclipse.gmf.diagramrt.DiagramLink;" + NL + "import org.eclipse.gmf.diagramrt.DiagramNode;" + NL + "import org.eclipse.gmf.diagramrt.util.DiagramRTAdapterFactory;" + NL + "import org.eclipse.gmf.diagramrt.util.DiagramRTSwitch;" + NL + "import org.eclipse.gmf.edit.provider.metainfo.LinkMetaInfoProvider;" + NL + "import org.eclipse.gmf.edit.provider.metainfo.NodeMetaInfoProvider;";
+ protected final String TEXT_4 = NL + NL + NL + "/**" + NL + " * This one is for Basic DRT model." + NL + " * @generated" + NL + " */" + NL + "public class ";
+ protected final String TEXT_5 = " extends DiagramRTAdapterFactory implements ComposeableAdapterFactory, IDisposable {";
+ protected final String TEXT_6 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ComposedAdapterFactory myParentFactory;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean isFactoryForType(Object object) {" + NL + "\t\treturn NodeMetaInfoProvider.class.equals(object) || LinkMetaInfoProvider.class.equals(object) || super.isFactoryForType(object);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_7 = "() {" + NL + "\t\tsuper.modelSwitch = new DiagramRTSwitch() {" + NL + "\t\t\tpublic Object caseDiagramCanvas(DiagramCanvas object) {" + NL + "\t\t\t\treturn createDiagramCanvasAdapter(object);" + NL + "\t\t\t}" + NL + "\t\t\tpublic Object caseDiagramNode(DiagramNode object) {" + NL + "\t\t\t\treturn createDiagramNodeAdapter(object);" + NL + "\t\t\t}" + NL + "\t\t\tpublic Object caseDiagramLink(DiagramLink object) {" + NL + "\t\t\t\treturn createDiagramLinkAdapter(object);" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Adapter createDiagramCanvasAdapter(DiagramCanvas canvas) {" + NL + "\t\treturn create";
+ protected final String TEXT_8 = "();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Adapter createDiagramNodeAdapter(DiagramNode node) {" + NL + "\t\tswitch(node.getVisualID()) {";
+ protected final String TEXT_9 = NL + "\t\tcase ";
+ protected final String TEXT_10 = ".VISUAL_ID : return create";
+ protected final String TEXT_11 = "();";
+ protected final String TEXT_12 = NL + "\t\tdefault : throw new IllegalStateException(\"Wrong visual id for node:\" + node.getVisualID());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Adapter createDiagramLinkAdapter(DiagramLink link) {" + NL + "\t\tswitch(link.getVisualID()) {";
+ protected final String TEXT_13 = NL + "\t\tcase ";
+ protected final String TEXT_14 = ".VISUAL_ID : return create";
+ protected final String TEXT_15 = "();";
+ protected final String TEXT_16 = NL + "\t\tdefault : throw new IllegalStateException(\"Wrong visual id for link:\" + link.getVisualID());" + NL + "\t\t}" + NL + "\t}";
+ protected final String TEXT_17 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_18 = " my";
+ protected final String TEXT_19 = ";" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_20 = " create";
+ protected final String TEXT_21 = "() {" + NL + "\t\tif (my";
+ protected final String TEXT_22 = " == null) {" + NL + "\t\t\tmy";
+ protected final String TEXT_23 = " = new ";
+ protected final String TEXT_24 = "();" + NL + "\t\t}" + NL + "\t\treturn my";
+ protected final String TEXT_25 = ";" + NL + "\t}";
+ protected final String TEXT_26 = NL + "\t// TODO statful";
+ protected final String TEXT_27 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ComposeableAdapterFactory getRootAdapterFactory() {" + NL + "\t\treturn myParentFactory == null ? this : myParentFactory.getRootAdapterFactory();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {" + NL + "\t\tmyParentFactory = parentAdapterFactory;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void dispose() {" + NL + "\t}" + NL + "}";
+
+ public String generate(Object argument)
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+ GenDiagram genDiagram = (GenDiagram) argument;
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(genDiagram.getEditProvidersPackageName());
+ stringBuffer.append(TEXT_2);
+ ImportUtil importManager = new ImportUtil(genDiagram.getEditProvidersPackageName());
+ stringBuffer.append(TEXT_3);
+ importManager.markImportLocation(stringBuffer);
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(genDiagram.getMetaInfoFactoryClassName());
+ stringBuffer.append(TEXT_5);
+ final boolean STATELESS = true;
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append(genDiagram.getMetaInfoFactoryClassName());
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append(genDiagram.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_8);
+ for (Iterator it = genDiagram.getNodes().iterator(); it.hasNext();) { GenNode genNode = (GenNode) it.next();
+ stringBuffer.append(TEXT_9);
+ stringBuffer.append(importManager.getImportedName(genNode.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_10);
+ stringBuffer.append(genNode.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_11);
+ }
+ stringBuffer.append(TEXT_12);
+ for (Iterator it = genDiagram.getLinks().iterator(); it.hasNext();) { GenLink genLink = (GenLink) it.next();
+ stringBuffer.append(TEXT_13);
+ stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_14);
+ stringBuffer.append(genLink.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_15);
+ }
+ stringBuffer.append(TEXT_16);
+
+final List allElements = new LinkedList();
+allElements.addAll(genDiagram.getNodes());
+allElements.addAll(genDiagram.getLinks());
+allElements.add(genDiagram);
+for (Iterator it = allElements.iterator(); it.hasNext();) {
+ GenCommonBase genElement = (GenCommonBase) it.next();
+ final String mipQualifiedName = importManager.getImportedName(genElement.getMetaInfoProviderQualifiedClassName());
+ if (STATELESS) {
+
+ stringBuffer.append(TEXT_17);
+ stringBuffer.append(mipQualifiedName);
+ stringBuffer.append(TEXT_18);
+ stringBuffer.append(genElement.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_19);
+ stringBuffer.append(mipQualifiedName);
+ stringBuffer.append(TEXT_20);
+ stringBuffer.append(genElement.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_21);
+ stringBuffer.append(genElement.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_22);
+ stringBuffer.append(genElement.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_23);
+ stringBuffer.append(mipQualifiedName);
+ stringBuffer.append(TEXT_24);
+ stringBuffer.append(genElement.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_25);
+ } else {
+ stringBuffer.append(TEXT_26);
+ }
+ }
+ stringBuffer.append(TEXT_27);
+ importManager.emitSortedImports();
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/MetaInfoProviderAdapterFactory2Generator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/MetaInfoProviderAdapterFactory2Generator.java
new file mode 100644
index 000000000..5e3373072
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/MetaInfoProviderAdapterFactory2Generator.java
@@ -0,0 +1,97 @@
+package org.eclipse.gmf.codegen.templates.edit;
+
+import org.eclipse.gmf.codegen.gmfgen.*;
+import org.eclipse.emf.codegen.ecore.genmodel.*;
+import org.eclipse.gmf.codegen.util.ImportUtil;
+import java.util.*;
+
+public class MetaInfoProviderAdapterFactory2Generator
+{
+ protected static String nl;
+ public static synchronized MetaInfoProviderAdapterFactory2Generator create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ MetaInfoProviderAdapterFactory2Generator result = new MetaInfoProviderAdapterFactory2Generator();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "package ";
+ protected final String TEXT_2 = ";";
+ protected final String TEXT_3 = NL + NL + "import org.eclipse.emf.common.notify.Adapter;" + NL + "import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;" + NL + "import org.eclipse.emf.edit.provider.ComposedAdapterFactory;" + NL + "import org.eclipse.emf.edit.provider.IDisposable;" + NL + "import org.eclipse.gmf.diagramrt.DiagramCanvas;" + NL + "import org.eclipse.gmf.diagramrt.DiagramLink;" + NL + "import org.eclipse.gmf.diagramrt.DiagramNode;" + NL + "import org.eclipse.gmf.diagramrt.util.DiagramRTAdapterFactory;" + NL + "import org.eclipse.gmf.diagramrt.util.DiagramRTSwitch;" + NL + "import org.eclipse.gmf.edit.provider.metainfo.LinkMetaInfoProvider;" + NL + "import org.eclipse.gmf.edit.provider.metainfo.NodeMetaInfoProvider;";
+ protected final String TEXT_4 = NL + NL + NL + "/**" + NL + " * This one is for specific DRT model of ";
+ protected final String TEXT_5 = "." + NL + " * @generated" + NL + " */" + NL + "public class ";
+ protected final String TEXT_6 = " extends ";
+ protected final String TEXT_7 = " implements ComposeableAdapterFactory, IDisposable {";
+ protected final String TEXT_8 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ComposedAdapterFactory myParentFactory;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean isFactoryForType(Object object) {" + NL + "\t\treturn NodeMetaInfoProvider.class.equals(object) || LinkMetaInfoProvider.class.equals(object) || super.isFactoryForType(object);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_9 = "() {" + NL + "\t}" + NL;
+ protected final String TEXT_10 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_11 = " my";
+ protected final String TEXT_12 = ";" + NL + "" + NL + "\t/**" + NL + "\t * XXX Looks like we restrict ourselves to 'full' DRT models here, ie for each kind " + NL + "\t * of node/link on diagram there should be separate class in DRT. Otherwise, " + NL + "\t * there will be no different createXXXAdapter methods and same metainfo " + NL + "\t * @generated" + NL + "\t * @overrides" + NL + "\t */" + NL + "\tpublic Adapter create";
+ protected final String TEXT_13 = "Adapter() {" + NL + "\t\tif (my";
+ protected final String TEXT_14 = " == null) {" + NL + "\t\t\tmy";
+ protected final String TEXT_15 = " = new ";
+ protected final String TEXT_16 = "();" + NL + "\t\t}" + NL + "\t\treturn my";
+ protected final String TEXT_17 = ";" + NL + "\t}";
+ protected final String TEXT_18 = NL + "\t// TODO statful";
+ protected final String TEXT_19 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ComposeableAdapterFactory getRootAdapterFactory() {" + NL + "\t\treturn myParentFactory == null ? this : myParentFactory.getRootAdapterFactory();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {" + NL + "\t\tmyParentFactory = parentAdapterFactory;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void dispose() {" + NL + "\t}" + NL + "}";
+
+ public String generate(Object argument)
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+
+GenDiagram genDiagram = (GenDiagram) argument;
+GenPackage rtGenPackage = genDiagram.getDiagramRunTimeClass().getGenPackage();
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(genDiagram.getEditProvidersPackageName());
+ stringBuffer.append(TEXT_2);
+ ImportUtil importManager = new ImportUtil(genDiagram.getEditProvidersPackageName());
+ stringBuffer.append(TEXT_3);
+ importManager.markImportLocation(stringBuffer);
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(rtGenPackage.getEcorePackage().getName());
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(genDiagram.getMetaInfoFactoryClassName());
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append(importManager.getImportedName(rtGenPackage.getQualifiedAdapterFactoryClassName()));
+ stringBuffer.append(TEXT_7);
+ final boolean STATELESS = true;
+ stringBuffer.append(TEXT_8);
+ stringBuffer.append(genDiagram.getMetaInfoFactoryClassName());
+ stringBuffer.append(TEXT_9);
+
+final List allElements = new LinkedList();
+allElements.addAll(genDiagram.getNodes());
+allElements.addAll(genDiagram.getLinks());
+allElements.add(genDiagram);
+for (Iterator it = allElements.iterator(); it.hasNext();) {
+ GenCommonBase genElement = (GenCommonBase) it.next();
+ final String mipQualifiedName = importManager.getImportedName(genElement.getMetaInfoProviderQualifiedClassName());
+ if (STATELESS) {
+
+ stringBuffer.append(TEXT_10);
+ stringBuffer.append(mipQualifiedName);
+ stringBuffer.append(TEXT_11);
+ stringBuffer.append(genElement.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_12);
+ stringBuffer.append(genElement.getDiagramRunTimeClass().getName());
+ stringBuffer.append(TEXT_13);
+ stringBuffer.append(genElement.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_14);
+ stringBuffer.append(genElement.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_15);
+ stringBuffer.append(mipQualifiedName);
+ stringBuffer.append(TEXT_16);
+ stringBuffer.append(genElement.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_17);
+ } else {
+ stringBuffer.append(TEXT_18);
+ }
+ }
+ stringBuffer.append(TEXT_19);
+ importManager.emitSortedImports();
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/NodeMetaInfoProviderGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/NodeMetaInfoProviderGenerator.java
new file mode 100644
index 000000000..21037431b
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/edit/NodeMetaInfoProviderGenerator.java
@@ -0,0 +1,75 @@
+package org.eclipse.gmf.codegen.templates.edit;
+
+import org.eclipse.gmf.codegen.gmfgen.*;
+import org.eclipse.emf.codegen.ecore.genmodel.*;
+import java.util.*;
+import org.eclipse.gmf.codegen.util.ImportUtil;
+
+public class NodeMetaInfoProviderGenerator
+{
+ protected static String nl;
+ public static synchronized NodeMetaInfoProviderGenerator create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ NodeMetaInfoProviderGenerator result = new NodeMetaInfoProviderGenerator();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "package ";
+ protected final String TEXT_2 = ";";
+ protected final String TEXT_3 = NL + NL + "import org.eclipse.emf.ecore.EStructuralFeature;" + NL + "import org.eclipse.gmf.diagramrt.ChildNode;" + NL + "import org.eclipse.gmf.diagramrt.DiagramNode;" + NL + "import org.eclipse.gmf.edit.provider.metainfo.MetaInfoProviderAdapter;" + NL + "import org.eclipse.gmf.edit.provider.metainfo.NodeMetaInfoProvider;";
+ protected final String TEXT_4 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
+ protected final String TEXT_5 = " extends MetaInfoProviderAdapter implements NodeMetaInfoProvider {" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EStructuralFeature getContainmentFeature(DiagramNode node) {";
+ protected final String TEXT_6 = NL + "\t\treturn ";
+ protected final String TEXT_7 = ".eINSTANCE.get";
+ protected final String TEXT_8 = "();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EStructuralFeature getContainmentFeature(DiagramNode node, ChildNode childNode) {";
+ protected final String TEXT_9 = NL + "\t\tif (\"";
+ protected final String TEXT_10 = "\".equals(childNode.getGroupID())) {" + NL + "\t\t\treturn ";
+ protected final String TEXT_11 = ".eINSTANCE.get";
+ protected final String TEXT_12 = "();" + NL + "\t\t}";
+ protected final String TEXT_13 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "}";
+
+ public String generate(Object argument)
+ {
+ StringBuffer stringBuffer = new StringBuffer();
+ GenNode genNode = (GenNode) argument;
+ GenDiagram genDiagram = genNode.getDiagram();
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(genDiagram.getEditProvidersPackageName());
+ stringBuffer.append(TEXT_2);
+ ImportUtil importManager = new ImportUtil(genDiagram.getEditProvidersPackageName());
+ stringBuffer.append(TEXT_3);
+ importManager.markImportLocation(stringBuffer);
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(genNode.getMetaInfoProviderClassName());
+ stringBuffer.append(TEXT_5);
+
+GenFeature genFeature2 = genDiagram.findGenFeature(genNode.getContainmentMetaFeature());
+String metaPackageInterfaceName2 = importManager.getImportedName(genFeature2.getGenPackage().getQualifiedPackageInterfaceName());
+
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append(metaPackageInterfaceName2);
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append(genFeature2.getFeatureAccessorName());
+ stringBuffer.append(TEXT_8);
+
+for (Iterator it = genNode.getChildNodes().iterator(); it.hasNext();) {
+GenChildNode next = (GenChildNode) it.next();
+GenFeature genFeature1 = genDiagram.findGenFeature(next.getContainmentMetaFeature());
+String metaPackageInterfaceName1 = importManager.getImportedName(genFeature1.getGenPackage().getQualifiedPackageInterfaceName());
+
+ stringBuffer.append(TEXT_9);
+ stringBuffer.append(next.getGroupID());
+ stringBuffer.append(TEXT_10);
+ stringBuffer.append(metaPackageInterfaceName1);
+ stringBuffer.append(TEXT_11);
+ stringBuffer.append(genFeature1.getFeatureAccessorName());
+ stringBuffer.append(TEXT_12);
+ }
+ stringBuffer.append(TEXT_13);
+ importManager.emitSortedImports();
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/CompartmentLayoutKind.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/CompartmentLayoutKind.java
new file mode 100644
index 000000000..fee277c6e
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/CompartmentLayoutKind.java
@@ -0,0 +1,216 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.AbstractEnumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Compartment Layout Kind</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getCompartmentLayoutKind()
+ * @model
+ * @generated
+ */
+public final class CompartmentLayoutKind extends AbstractEnumerator {
+ /**
+ * The '<em><b>BORDER</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>BORDER</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #BORDER_LITERAL
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int BORDER = 0;
+
+ /**
+ * The '<em><b>FLOW</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>FLOW</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #FLOW_LITERAL
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int FLOW = 1;
+
+ /**
+ * The '<em><b>SCROLL</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>SCROLL</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #SCROLL_LITERAL
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int SCROLL = 2;
+
+ /**
+ * The '<em><b>TOOLBAR</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>TOOLBAR</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #TOOLBAR_LITERAL
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int TOOLBAR = 3;
+
+ /**
+ * The '<em><b>XY</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>XY</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #XY_LITERAL
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int XY = 4;
+
+ /**
+ * The '<em><b>BORDER</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #BORDER
+ * @generated
+ * @ordered
+ */
+ public static final CompartmentLayoutKind BORDER_LITERAL = new CompartmentLayoutKind(BORDER, "BORDER");
+
+ /**
+ * The '<em><b>FLOW</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #FLOW
+ * @generated
+ * @ordered
+ */
+ public static final CompartmentLayoutKind FLOW_LITERAL = new CompartmentLayoutKind(FLOW, "FLOW");
+
+ /**
+ * The '<em><b>SCROLL</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #SCROLL
+ * @generated
+ * @ordered
+ */
+ public static final CompartmentLayoutKind SCROLL_LITERAL = new CompartmentLayoutKind(SCROLL, "SCROLL");
+
+ /**
+ * The '<em><b>TOOLBAR</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #TOOLBAR
+ * @generated
+ * @ordered
+ */
+ public static final CompartmentLayoutKind TOOLBAR_LITERAL = new CompartmentLayoutKind(TOOLBAR, "TOOLBAR");
+
+ /**
+ * The '<em><b>XY</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #XY
+ * @generated
+ * @ordered
+ */
+ public static final CompartmentLayoutKind XY_LITERAL = new CompartmentLayoutKind(XY, "XY");
+
+ /**
+ * An array of all the '<em><b>Compartment Layout Kind</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final CompartmentLayoutKind[] VALUES_ARRAY =
+ new CompartmentLayoutKind[] {
+ BORDER_LITERAL,
+ FLOW_LITERAL,
+ SCROLL_LITERAL,
+ TOOLBAR_LITERAL,
+ XY_LITERAL,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Compartment Layout Kind</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Compartment Layout Kind</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static CompartmentLayoutKind get(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ CompartmentLayoutKind result = VALUES_ARRAY[i];
+ if (result.toString().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Compartment Layout Kind</b></em>' literal with the specified value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static CompartmentLayoutKind get(int value) {
+ switch (value) {
+ case BORDER: return BORDER_LITERAL;
+ case FLOW: return FLOW_LITERAL;
+ case SCROLL: return SCROLL_LITERAL;
+ case TOOLBAR: return TOOLBAR_LITERAL;
+ case XY: return XY_LITERAL;
+ }
+ return null;
+ }
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private CompartmentLayoutKind(int value, String name) {
+ super(value, name);
+ }
+
+} //CompartmentLayoutKind
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/CompartmentPlacementKind.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/CompartmentPlacementKind.java
new file mode 100644
index 000000000..e68380c9f
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/CompartmentPlacementKind.java
@@ -0,0 +1,135 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.AbstractEnumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Compartment Placement Kind</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getCompartmentPlacementKind()
+ * @model
+ * @generated
+ */
+public final class CompartmentPlacementKind extends AbstractEnumerator {
+ /**
+ * The '<em><b>FLOW</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>FLOW</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #FLOW_LITERAL
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int FLOW = 0;
+
+ /**
+ * The '<em><b>TOOLBAR</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>TOOLBAR</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #TOOLBAR_LITERAL
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int TOOLBAR = 1;
+
+ /**
+ * The '<em><b>FLOW</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #FLOW
+ * @generated
+ * @ordered
+ */
+ public static final CompartmentPlacementKind FLOW_LITERAL = new CompartmentPlacementKind(FLOW, "FLOW");
+
+ /**
+ * The '<em><b>TOOLBAR</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #TOOLBAR
+ * @generated
+ * @ordered
+ */
+ public static final CompartmentPlacementKind TOOLBAR_LITERAL = new CompartmentPlacementKind(TOOLBAR, "TOOLBAR");
+
+ /**
+ * An array of all the '<em><b>Compartment Placement Kind</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final CompartmentPlacementKind[] VALUES_ARRAY =
+ new CompartmentPlacementKind[] {
+ FLOW_LITERAL,
+ TOOLBAR_LITERAL,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Compartment Placement Kind</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Compartment Placement Kind</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static CompartmentPlacementKind get(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ CompartmentPlacementKind result = VALUES_ARRAY[i];
+ if (result.toString().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Compartment Placement Kind</b></em>' literal with the specified value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static CompartmentPlacementKind get(int value) {
+ switch (value) {
+ case FLOW: return FLOW_LITERAL;
+ case TOOLBAR: return TOOLBAR_LITERAL;
+ }
+ return null;
+ }
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private CompartmentPlacementKind(int value, String name) {
+ super(value, name);
+ }
+
+} //CompartmentPlacementKind
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/EntryBase.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/EntryBase.java
new file mode 100644
index 000000000..2f23bd410
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/EntryBase.java
@@ -0,0 +1,162 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Entry Base</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getOrder <em>Order</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getTitleKey <em>Title Key</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getDescriptionKey <em>Description Key</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getLargeIconPath <em>Large Icon Path</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getSmallIconPath <em>Small Icon Path</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getEntryBase()
+ * @model abstract="true"
+ * @generated
+ */
+public interface EntryBase extends EObject {
+ /**
+ * Returns the value of the '<em><b>Order</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Order</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Order</em>' attribute.
+ * @see #setOrder(int)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getEntryBase_Order()
+ * @model
+ * @generated
+ */
+ int getOrder();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getOrder <em>Order</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Order</em>' attribute.
+ * @see #getOrder()
+ * @generated
+ */
+ void setOrder(int value);
+
+ /**
+ * Returns the value of the '<em><b>Title Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Title Key</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Title Key</em>' attribute.
+ * @see #setTitleKey(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getEntryBase_TitleKey()
+ * @model
+ * @generated
+ */
+ String getTitleKey();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getTitleKey <em>Title Key</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Title Key</em>' attribute.
+ * @see #getTitleKey()
+ * @generated
+ */
+ void setTitleKey(String value);
+
+ /**
+ * Returns the value of the '<em><b>Description Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Description Key</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Description Key</em>' attribute.
+ * @see #setDescriptionKey(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getEntryBase_DescriptionKey()
+ * @model
+ * @generated
+ */
+ String getDescriptionKey();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getDescriptionKey <em>Description Key</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Description Key</em>' attribute.
+ * @see #getDescriptionKey()
+ * @generated
+ */
+ void setDescriptionKey(String value);
+
+ /**
+ * Returns the value of the '<em><b>Large Icon Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Large Icon Path</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Large Icon Path</em>' attribute.
+ * @see #setLargeIconPath(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getEntryBase_LargeIconPath()
+ * @model
+ * @generated
+ */
+ String getLargeIconPath();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getLargeIconPath <em>Large Icon Path</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Large Icon Path</em>' attribute.
+ * @see #getLargeIconPath()
+ * @generated
+ */
+ void setLargeIconPath(String value);
+
+ /**
+ * Returns the value of the '<em><b>Small Icon Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Small Icon Path</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Small Icon Path</em>' attribute.
+ * @see #setSmallIconPath(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getEntryBase_SmallIconPath()
+ * @model
+ * @generated
+ */
+ String getSmallIconPath();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getSmallIconPath <em>Small Icon Path</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Small Icon Path</em>' attribute.
+ * @see #getSmallIconPath()
+ * @generated
+ */
+ void setSmallIconPath(String value);
+
+} // EntryBase
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenFactory.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenFactory.java
new file mode 100644
index 000000000..8ee4b8a6c
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenFactory.java
@@ -0,0 +1,127 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen;
+
+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.gmf.codegen.gmfgen.GMFGenPackage
+ * @generated
+ */
+public interface GMFGenFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ GMFGenFactory eINSTANCE = new org.eclipse.gmf.codegen.gmfgen.impl.GMFGenFactoryImpl();
+
+ /**
+ * Returns a new object of class '<em>Gen Diagram</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Gen Diagram</em>'.
+ * @generated
+ */
+ GenDiagram createGenDiagram();
+
+ /**
+ * Returns a new object of class '<em>Gen Node</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Gen Node</em>'.
+ * @generated
+ */
+ GenNode createGenNode();
+
+ /**
+ * Returns a new object of class '<em>Gen Child Node</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Gen Child Node</em>'.
+ * @generated
+ */
+ GenChildNode createGenChildNode();
+
+ /**
+ * Returns a new object of class '<em>Gen Child Container</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Gen Child Container</em>'.
+ * @generated
+ */
+ GenChildContainer createGenChildContainer();
+
+ /**
+ * Returns a new object of class '<em>Gen Link With Class</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Gen Link With Class</em>'.
+ * @generated
+ */
+ GenLinkWithClass createGenLinkWithClass();
+
+ /**
+ * Returns a new object of class '<em>Gen Link Reference Only</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Gen Link Reference Only</em>'.
+ * @generated
+ */
+ GenLinkReferenceOnly createGenLinkReferenceOnly();
+
+ /**
+ * Returns a new object of class '<em>Palette</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Palette</em>'.
+ * @generated
+ */
+ Palette createPalette();
+
+ /**
+ * Returns a new object of class '<em>Node Entry</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Node Entry</em>'.
+ * @generated
+ */
+ NodeEntry createNodeEntry();
+
+ /**
+ * Returns a new object of class '<em>Link Entry</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Link Entry</em>'.
+ * @generated
+ */
+ LinkEntry createLinkEntry();
+
+ /**
+ * Returns a new object of class '<em>Tool Group</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Tool Group</em>'.
+ * @generated
+ */
+ ToolGroup createToolGroup();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ GMFGenPackage getGMFGenPackage();
+
+} //GMFGenFactory
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenPackage.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenPackage.java
new file mode 100644
index 000000000..a5e0416c3
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenPackage.java
@@ -0,0 +1,2811 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- 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.gmf.codegen.gmfgen.GMFGenFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface GMFGenPackage extends EPackage{
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "gmfgen";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/gmf/2005/GenModel";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "gmfgen";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ GMFGenPackage eINSTANCE = org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.GenCommonBaseImpl <em>Gen Common Base</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GenCommonBaseImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenCommonBase()
+ * @generated
+ */
+ int GEN_COMMON_BASE = 1;
+
+ /**
+ * The feature id for the '<em><b>Diagram Run Time Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_COMMON_BASE__DIAGRAM_RUN_TIME_CLASS = 0;
+
+ /**
+ * The feature id for the '<em><b>Visual ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_COMMON_BASE__VISUAL_ID = 1;
+
+ /**
+ * The feature id for the '<em><b>Edit Part Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_COMMON_BASE__EDIT_PART_CLASS_NAME = 2;
+
+ /**
+ * The feature id for the '<em><b>Meta Info Provider Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_COMMON_BASE__META_INFO_PROVIDER_CLASS_NAME = 3;
+
+ /**
+ * The number of structural features of the the '<em>Gen Common Base</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_COMMON_BASE_FEATURE_COUNT = 4;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.GenDiagramImpl <em>Gen Diagram</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GenDiagramImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenDiagram()
+ * @generated
+ */
+ int GEN_DIAGRAM = 0;
+
+ /**
+ * The feature id for the '<em><b>Diagram Run Time Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__DIAGRAM_RUN_TIME_CLASS = GEN_COMMON_BASE__DIAGRAM_RUN_TIME_CLASS;
+
+ /**
+ * The feature id for the '<em><b>Visual ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__VISUAL_ID = GEN_COMMON_BASE__VISUAL_ID;
+
+ /**
+ * The feature id for the '<em><b>Edit Part Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__EDIT_PART_CLASS_NAME = GEN_COMMON_BASE__EDIT_PART_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Meta Info Provider Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__META_INFO_PROVIDER_CLASS_NAME = GEN_COMMON_BASE__META_INFO_PROVIDER_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Domain Meta Model</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__DOMAIN_META_MODEL = GEN_COMMON_BASE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Emf Gen Model</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__EMF_GEN_MODEL = GEN_COMMON_BASE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Domain Diagram Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__DOMAIN_DIAGRAM_ELEMENT = GEN_COMMON_BASE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Nodes</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__NODES = GEN_COMMON_BASE_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Links</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__LINKS = GEN_COMMON_BASE_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Palette</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__PALETTE = GEN_COMMON_BASE_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>Edit Parts Package Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__EDIT_PARTS_PACKAGE_NAME = GEN_COMMON_BASE_FEATURE_COUNT + 6;
+
+ /**
+ * The feature id for the '<em><b>Commands Package Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__COMMANDS_PACKAGE_NAME = GEN_COMMON_BASE_FEATURE_COUNT + 7;
+
+ /**
+ * The feature id for the '<em><b>Edit Providers Package Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__EDIT_PROVIDERS_PACKAGE_NAME = GEN_COMMON_BASE_FEATURE_COUNT + 8;
+
+ /**
+ * The feature id for the '<em><b>Plugin Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__PLUGIN_NAME = GEN_COMMON_BASE_FEATURE_COUNT + 9;
+
+ /**
+ * The feature id for the '<em><b>Provider Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__PROVIDER_NAME = GEN_COMMON_BASE_FEATURE_COUNT + 10;
+
+ /**
+ * The feature id for the '<em><b>Plugin ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__PLUGIN_ID = GEN_COMMON_BASE_FEATURE_COUNT + 11;
+
+ /**
+ * The feature id for the '<em><b>Plugin Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__PLUGIN_CLASS_NAME = GEN_COMMON_BASE_FEATURE_COUNT + 12;
+
+ /**
+ * The feature id for the '<em><b>Editor Package Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__EDITOR_PACKAGE_NAME = GEN_COMMON_BASE_FEATURE_COUNT + 13;
+
+ /**
+ * The feature id for the '<em><b>Editor Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__EDITOR_CLASS_NAME = GEN_COMMON_BASE_FEATURE_COUNT + 14;
+
+ /**
+ * The feature id for the '<em><b>Edit Part Factory Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__EDIT_PART_FACTORY_CLASS_NAME = GEN_COMMON_BASE_FEATURE_COUNT + 15;
+
+ /**
+ * The feature id for the '<em><b>Meta Info Factory Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__META_INFO_FACTORY_CLASS_NAME = GEN_COMMON_BASE_FEATURE_COUNT + 16;
+
+ /**
+ * The feature id for the '<em><b>Has Domain Model</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__HAS_DOMAIN_MODEL = GEN_COMMON_BASE_FEATURE_COUNT + 17;
+
+ /**
+ * The feature id for the '<em><b>Diagram File Extension</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__DIAGRAM_FILE_EXTENSION = GEN_COMMON_BASE_FEATURE_COUNT + 18;
+
+ /**
+ * The feature id for the '<em><b>Same File For Diagram And Model</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM__SAME_FILE_FOR_DIAGRAM_AND_MODEL = GEN_COMMON_BASE_FEATURE_COUNT + 19;
+
+ /**
+ * The number of structural features of the the '<em>Gen Diagram</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_DIAGRAM_FEATURE_COUNT = GEN_COMMON_BASE_FEATURE_COUNT + 20;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.GenBaseElementImpl <em>Gen Base Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GenBaseElementImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenBaseElement()
+ * @generated
+ */
+ int GEN_BASE_ELEMENT = 2;
+
+ /**
+ * The feature id for the '<em><b>Diagram Run Time Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_BASE_ELEMENT__DIAGRAM_RUN_TIME_CLASS = GEN_COMMON_BASE__DIAGRAM_RUN_TIME_CLASS;
+
+ /**
+ * The feature id for the '<em><b>Visual ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_BASE_ELEMENT__VISUAL_ID = GEN_COMMON_BASE__VISUAL_ID;
+
+ /**
+ * The feature id for the '<em><b>Edit Part Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_BASE_ELEMENT__EDIT_PART_CLASS_NAME = GEN_COMMON_BASE__EDIT_PART_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Meta Info Provider Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_BASE_ELEMENT__META_INFO_PROVIDER_CLASS_NAME = GEN_COMMON_BASE__META_INFO_PROVIDER_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Domain Name Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_BASE_ELEMENT__DOMAIN_NAME_FEATURE = GEN_COMMON_BASE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Foreground Color</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_BASE_ELEMENT__FOREGROUND_COLOR = GEN_COMMON_BASE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Containment Meta Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_BASE_ELEMENT__CONTAINMENT_META_FEATURE = GEN_COMMON_BASE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the the '<em>Gen Base Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_BASE_ELEMENT_FEATURE_COUNT = GEN_COMMON_BASE_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.GenNodeImpl <em>Gen Node</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GenNodeImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenNode()
+ * @generated
+ */
+ int GEN_NODE = 3;
+
+ /**
+ * The feature id for the '<em><b>Diagram Run Time Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__DIAGRAM_RUN_TIME_CLASS = GEN_BASE_ELEMENT__DIAGRAM_RUN_TIME_CLASS;
+
+ /**
+ * The feature id for the '<em><b>Visual ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__VISUAL_ID = GEN_BASE_ELEMENT__VISUAL_ID;
+
+ /**
+ * The feature id for the '<em><b>Edit Part Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__EDIT_PART_CLASS_NAME = GEN_BASE_ELEMENT__EDIT_PART_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Meta Info Provider Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__META_INFO_PROVIDER_CLASS_NAME = GEN_BASE_ELEMENT__META_INFO_PROVIDER_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Domain Name Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__DOMAIN_NAME_FEATURE = GEN_BASE_ELEMENT__DOMAIN_NAME_FEATURE;
+
+ /**
+ * The feature id for the '<em><b>Foreground Color</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__FOREGROUND_COLOR = GEN_BASE_ELEMENT__FOREGROUND_COLOR;
+
+ /**
+ * The feature id for the '<em><b>Containment Meta Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__CONTAINMENT_META_FEATURE = GEN_BASE_ELEMENT__CONTAINMENT_META_FEATURE;
+
+ /**
+ * The feature id for the '<em><b>Diagram</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__DIAGRAM = GEN_BASE_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Domain Meta Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__DOMAIN_META_CLASS = GEN_BASE_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Viewmap URI</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__VIEWMAP_URI = GEN_BASE_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Node Visualization Kind</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__NODE_VISUALIZATION_KIND = GEN_BASE_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Viewmap Class</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__VIEWMAP_CLASS = GEN_BASE_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Affixed Stereotypes</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__AFFIXED_STEREOTYPES = GEN_BASE_ELEMENT_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>Background Color</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__BACKGROUND_COLOR = GEN_BASE_ELEMENT_FEATURE_COUNT + 6;
+
+ /**
+ * The feature id for the '<em><b>Child Containers</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__CHILD_CONTAINERS = GEN_BASE_ELEMENT_FEATURE_COUNT + 7;
+
+ /**
+ * The feature id for the '<em><b>Child Nodes</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__CHILD_NODES = GEN_BASE_ELEMENT_FEATURE_COUNT + 8;
+
+ /**
+ * The feature id for the '<em><b>Child Containers Placement</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE__CHILD_CONTAINERS_PLACEMENT = GEN_BASE_ELEMENT_FEATURE_COUNT + 9;
+
+ /**
+ * The number of structural features of the the '<em>Gen Node</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_NODE_FEATURE_COUNT = GEN_BASE_ELEMENT_FEATURE_COUNT + 10;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.GenChildNodeImpl <em>Gen Child Node</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GenChildNodeImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenChildNode()
+ * @generated
+ */
+ int GEN_CHILD_NODE = 4;
+
+ /**
+ * The feature id for the '<em><b>Diagram Run Time Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__DIAGRAM_RUN_TIME_CLASS = GEN_NODE__DIAGRAM_RUN_TIME_CLASS;
+
+ /**
+ * The feature id for the '<em><b>Visual ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__VISUAL_ID = GEN_NODE__VISUAL_ID;
+
+ /**
+ * The feature id for the '<em><b>Edit Part Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__EDIT_PART_CLASS_NAME = GEN_NODE__EDIT_PART_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Meta Info Provider Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__META_INFO_PROVIDER_CLASS_NAME = GEN_NODE__META_INFO_PROVIDER_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Domain Name Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__DOMAIN_NAME_FEATURE = GEN_NODE__DOMAIN_NAME_FEATURE;
+
+ /**
+ * The feature id for the '<em><b>Foreground Color</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__FOREGROUND_COLOR = GEN_NODE__FOREGROUND_COLOR;
+
+ /**
+ * The feature id for the '<em><b>Containment Meta Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__CONTAINMENT_META_FEATURE = GEN_NODE__CONTAINMENT_META_FEATURE;
+
+ /**
+ * The feature id for the '<em><b>Diagram</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__DIAGRAM = GEN_NODE__DIAGRAM;
+
+ /**
+ * The feature id for the '<em><b>Domain Meta Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__DOMAIN_META_CLASS = GEN_NODE__DOMAIN_META_CLASS;
+
+ /**
+ * The feature id for the '<em><b>Viewmap URI</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__VIEWMAP_URI = GEN_NODE__VIEWMAP_URI;
+
+ /**
+ * The feature id for the '<em><b>Node Visualization Kind</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__NODE_VISUALIZATION_KIND = GEN_NODE__NODE_VISUALIZATION_KIND;
+
+ /**
+ * The feature id for the '<em><b>Viewmap Class</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__VIEWMAP_CLASS = GEN_NODE__VIEWMAP_CLASS;
+
+ /**
+ * The feature id for the '<em><b>Affixed Stereotypes</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__AFFIXED_STEREOTYPES = GEN_NODE__AFFIXED_STEREOTYPES;
+
+ /**
+ * The feature id for the '<em><b>Background Color</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__BACKGROUND_COLOR = GEN_NODE__BACKGROUND_COLOR;
+
+ /**
+ * The feature id for the '<em><b>Child Containers</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__CHILD_CONTAINERS = GEN_NODE__CHILD_CONTAINERS;
+
+ /**
+ * The feature id for the '<em><b>Child Nodes</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__CHILD_NODES = GEN_NODE__CHILD_NODES;
+
+ /**
+ * The feature id for the '<em><b>Child Containers Placement</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__CHILD_CONTAINERS_PLACEMENT = GEN_NODE__CHILD_CONTAINERS_PLACEMENT;
+
+ /**
+ * The feature id for the '<em><b>Group ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__GROUP_ID = GEN_NODE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Parent Node</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__PARENT_NODE = GEN_NODE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Child Meta Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE__CHILD_META_FEATURE = GEN_NODE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the the '<em>Gen Child Node</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_NODE_FEATURE_COUNT = GEN_NODE_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.GenChildContainerImpl <em>Gen Child Container</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GenChildContainerImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenChildContainer()
+ * @generated
+ */
+ int GEN_CHILD_CONTAINER = 5;
+
+ /**
+ * The feature id for the '<em><b>Group ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_CONTAINER__GROUP_ID = 0;
+
+ /**
+ * The feature id for the '<em><b>Title Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_CONTAINER__TITLE_KEY = 1;
+
+ /**
+ * The feature id for the '<em><b>Can Collapse</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_CONTAINER__CAN_COLLAPSE = 2;
+
+ /**
+ * The feature id for the '<em><b>Hide If Empty</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_CONTAINER__HIDE_IF_EMPTY = 3;
+
+ /**
+ * The feature id for the '<em><b>Needs Title</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_CONTAINER__NEEDS_TITLE = 4;
+
+ /**
+ * The feature id for the '<em><b>Layout Kind</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_CONTAINER__LAYOUT_KIND = 5;
+
+ /**
+ * The number of structural features of the the '<em>Gen Child Container</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_CHILD_CONTAINER_FEATURE_COUNT = 6;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.GenLinkImpl <em>Gen Link</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GenLinkImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenLink()
+ * @generated
+ */
+ int GEN_LINK = 6;
+
+ /**
+ * The feature id for the '<em><b>Diagram Run Time Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK__DIAGRAM_RUN_TIME_CLASS = GEN_BASE_ELEMENT__DIAGRAM_RUN_TIME_CLASS;
+
+ /**
+ * The feature id for the '<em><b>Visual ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK__VISUAL_ID = GEN_BASE_ELEMENT__VISUAL_ID;
+
+ /**
+ * The feature id for the '<em><b>Edit Part Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK__EDIT_PART_CLASS_NAME = GEN_BASE_ELEMENT__EDIT_PART_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Meta Info Provider Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK__META_INFO_PROVIDER_CLASS_NAME = GEN_BASE_ELEMENT__META_INFO_PROVIDER_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Domain Name Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK__DOMAIN_NAME_FEATURE = GEN_BASE_ELEMENT__DOMAIN_NAME_FEATURE;
+
+ /**
+ * The feature id for the '<em><b>Foreground Color</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK__FOREGROUND_COLOR = GEN_BASE_ELEMENT__FOREGROUND_COLOR;
+
+ /**
+ * The feature id for the '<em><b>Containment Meta Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK__CONTAINMENT_META_FEATURE = GEN_BASE_ELEMENT__CONTAINMENT_META_FEATURE;
+
+ /**
+ * The feature id for the '<em><b>Diagram</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK__DIAGRAM = GEN_BASE_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Domain Link Target Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK__DOMAIN_LINK_TARGET_FEATURE = GEN_BASE_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Line Style</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK__LINE_STYLE = GEN_BASE_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Figure Qualified Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK__FIGURE_QUALIFIED_CLASS_NAME = GEN_BASE_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Source Decoration Figure Qualified Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK__SOURCE_DECORATION_FIGURE_QUALIFIED_CLASS_NAME = GEN_BASE_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Target Decoration Figure Qualified Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK__TARGET_DECORATION_FIGURE_QUALIFIED_CLASS_NAME = GEN_BASE_ELEMENT_FEATURE_COUNT + 5;
+
+ /**
+ * The number of structural features of the the '<em>Gen Link</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_FEATURE_COUNT = GEN_BASE_ELEMENT_FEATURE_COUNT + 6;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.GenLinkWithClassImpl <em>Gen Link With Class</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GenLinkWithClassImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenLinkWithClass()
+ * @generated
+ */
+ int GEN_LINK_WITH_CLASS = 7;
+
+ /**
+ * The feature id for the '<em><b>Diagram Run Time Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__DIAGRAM_RUN_TIME_CLASS = GEN_LINK__DIAGRAM_RUN_TIME_CLASS;
+
+ /**
+ * The feature id for the '<em><b>Visual ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__VISUAL_ID = GEN_LINK__VISUAL_ID;
+
+ /**
+ * The feature id for the '<em><b>Edit Part Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__EDIT_PART_CLASS_NAME = GEN_LINK__EDIT_PART_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Meta Info Provider Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__META_INFO_PROVIDER_CLASS_NAME = GEN_LINK__META_INFO_PROVIDER_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Domain Name Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__DOMAIN_NAME_FEATURE = GEN_LINK__DOMAIN_NAME_FEATURE;
+
+ /**
+ * The feature id for the '<em><b>Foreground Color</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__FOREGROUND_COLOR = GEN_LINK__FOREGROUND_COLOR;
+
+ /**
+ * The feature id for the '<em><b>Containment Meta Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__CONTAINMENT_META_FEATURE = GEN_LINK__CONTAINMENT_META_FEATURE;
+
+ /**
+ * The feature id for the '<em><b>Diagram</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__DIAGRAM = GEN_LINK__DIAGRAM;
+
+ /**
+ * The feature id for the '<em><b>Domain Link Target Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__DOMAIN_LINK_TARGET_FEATURE = GEN_LINK__DOMAIN_LINK_TARGET_FEATURE;
+
+ /**
+ * The feature id for the '<em><b>Line Style</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__LINE_STYLE = GEN_LINK__LINE_STYLE;
+
+ /**
+ * The feature id for the '<em><b>Figure Qualified Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__FIGURE_QUALIFIED_CLASS_NAME = GEN_LINK__FIGURE_QUALIFIED_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Source Decoration Figure Qualified Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__SOURCE_DECORATION_FIGURE_QUALIFIED_CLASS_NAME = GEN_LINK__SOURCE_DECORATION_FIGURE_QUALIFIED_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Target Decoration Figure Qualified Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__TARGET_DECORATION_FIGURE_QUALIFIED_CLASS_NAME = GEN_LINK__TARGET_DECORATION_FIGURE_QUALIFIED_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Domain Meta Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__DOMAIN_META_CLASS = GEN_LINK_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Link Container Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS__LINK_CONTAINER_FEATURE = GEN_LINK_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the the '<em>Gen Link With Class</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_WITH_CLASS_FEATURE_COUNT = GEN_LINK_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.GenLinkReferenceOnlyImpl <em>Gen Link Reference Only</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GenLinkReferenceOnlyImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getGenLinkReferenceOnly()
+ * @generated
+ */
+ int GEN_LINK_REFERENCE_ONLY = 8;
+
+ /**
+ * The feature id for the '<em><b>Diagram Run Time Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_REFERENCE_ONLY__DIAGRAM_RUN_TIME_CLASS = GEN_LINK__DIAGRAM_RUN_TIME_CLASS;
+
+ /**
+ * The feature id for the '<em><b>Visual ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_REFERENCE_ONLY__VISUAL_ID = GEN_LINK__VISUAL_ID;
+
+ /**
+ * The feature id for the '<em><b>Edit Part Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_REFERENCE_ONLY__EDIT_PART_CLASS_NAME = GEN_LINK__EDIT_PART_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Meta Info Provider Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_REFERENCE_ONLY__META_INFO_PROVIDER_CLASS_NAME = GEN_LINK__META_INFO_PROVIDER_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Domain Name Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_REFERENCE_ONLY__DOMAIN_NAME_FEATURE = GEN_LINK__DOMAIN_NAME_FEATURE;
+
+ /**
+ * The feature id for the '<em><b>Foreground Color</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_REFERENCE_ONLY__FOREGROUND_COLOR = GEN_LINK__FOREGROUND_COLOR;
+
+ /**
+ * The feature id for the '<em><b>Containment Meta Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_REFERENCE_ONLY__CONTAINMENT_META_FEATURE = GEN_LINK__CONTAINMENT_META_FEATURE;
+
+ /**
+ * The feature id for the '<em><b>Diagram</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_REFERENCE_ONLY__DIAGRAM = GEN_LINK__DIAGRAM;
+
+ /**
+ * The feature id for the '<em><b>Domain Link Target Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_REFERENCE_ONLY__DOMAIN_LINK_TARGET_FEATURE = GEN_LINK__DOMAIN_LINK_TARGET_FEATURE;
+
+ /**
+ * The feature id for the '<em><b>Line Style</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_REFERENCE_ONLY__LINE_STYLE = GEN_LINK__LINE_STYLE;
+
+ /**
+ * The feature id for the '<em><b>Figure Qualified Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_REFERENCE_ONLY__FIGURE_QUALIFIED_CLASS_NAME = GEN_LINK__FIGURE_QUALIFIED_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Source Decoration Figure Qualified Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_REFERENCE_ONLY__SOURCE_DECORATION_FIGURE_QUALIFIED_CLASS_NAME = GEN_LINK__SOURCE_DECORATION_FIGURE_QUALIFIED_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Target Decoration Figure Qualified Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_REFERENCE_ONLY__TARGET_DECORATION_FIGURE_QUALIFIED_CLASS_NAME = GEN_LINK__TARGET_DECORATION_FIGURE_QUALIFIED_CLASS_NAME;
+
+ /**
+ * The number of structural features of the the '<em>Gen Link Reference Only</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GEN_LINK_REFERENCE_ONLY_FEATURE_COUNT = GEN_LINK_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.PaletteImpl <em>Palette</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.PaletteImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getPalette()
+ * @generated
+ */
+ int PALETTE = 9;
+
+ /**
+ * The feature id for the '<em><b>Diagram</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE__DIAGRAM = 0;
+
+ /**
+ * The feature id for the '<em><b>Groups</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE__GROUPS = 1;
+
+ /**
+ * The feature id for the '<em><b>Flyout</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE__FLYOUT = 2;
+
+ /**
+ * The feature id for the '<em><b>Need Zoom Tools</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE__NEED_ZOOM_TOOLS = 3;
+
+ /**
+ * The feature id for the '<em><b>Package Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE__PACKAGE_NAME = 4;
+
+ /**
+ * The feature id for the '<em><b>Factory Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE__FACTORY_CLASS_NAME = 5;
+
+ /**
+ * The number of structural features of the the '<em>Palette</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE_FEATURE_COUNT = 6;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.EntryBaseImpl <em>Entry Base</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.EntryBaseImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getEntryBase()
+ * @generated
+ */
+ int ENTRY_BASE = 10;
+
+ /**
+ * The feature id for the '<em><b>Order</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ENTRY_BASE__ORDER = 0;
+
+ /**
+ * The feature id for the '<em><b>Title Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ENTRY_BASE__TITLE_KEY = 1;
+
+ /**
+ * The feature id for the '<em><b>Description Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ENTRY_BASE__DESCRIPTION_KEY = 2;
+
+ /**
+ * The feature id for the '<em><b>Large Icon Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ENTRY_BASE__LARGE_ICON_PATH = 3;
+
+ /**
+ * The feature id for the '<em><b>Small Icon Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ENTRY_BASE__SMALL_ICON_PATH = 4;
+
+ /**
+ * The number of structural features of the the '<em>Entry Base</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ENTRY_BASE_FEATURE_COUNT = 5;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.ToolEntryImpl <em>Tool Entry</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.ToolEntryImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getToolEntry()
+ * @generated
+ */
+ int TOOL_ENTRY = 11;
+
+ /**
+ * The feature id for the '<em><b>Order</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_ENTRY__ORDER = ENTRY_BASE__ORDER;
+
+ /**
+ * The feature id for the '<em><b>Title Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_ENTRY__TITLE_KEY = ENTRY_BASE__TITLE_KEY;
+
+ /**
+ * The feature id for the '<em><b>Description Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_ENTRY__DESCRIPTION_KEY = ENTRY_BASE__DESCRIPTION_KEY;
+
+ /**
+ * The feature id for the '<em><b>Large Icon Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_ENTRY__LARGE_ICON_PATH = ENTRY_BASE__LARGE_ICON_PATH;
+
+ /**
+ * The feature id for the '<em><b>Small Icon Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_ENTRY__SMALL_ICON_PATH = ENTRY_BASE__SMALL_ICON_PATH;
+
+ /**
+ * The feature id for the '<em><b>Default</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_ENTRY__DEFAULT = ENTRY_BASE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the the '<em>Tool Entry</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_ENTRY_FEATURE_COUNT = ENTRY_BASE_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.NodeEntryImpl <em>Node Entry</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.NodeEntryImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getNodeEntry()
+ * @generated
+ */
+ int NODE_ENTRY = 12;
+
+ /**
+ * The feature id for the '<em><b>Order</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_ENTRY__ORDER = TOOL_ENTRY__ORDER;
+
+ /**
+ * The feature id for the '<em><b>Title Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_ENTRY__TITLE_KEY = TOOL_ENTRY__TITLE_KEY;
+
+ /**
+ * The feature id for the '<em><b>Description Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_ENTRY__DESCRIPTION_KEY = TOOL_ENTRY__DESCRIPTION_KEY;
+
+ /**
+ * The feature id for the '<em><b>Large Icon Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_ENTRY__LARGE_ICON_PATH = TOOL_ENTRY__LARGE_ICON_PATH;
+
+ /**
+ * The feature id for the '<em><b>Small Icon Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_ENTRY__SMALL_ICON_PATH = TOOL_ENTRY__SMALL_ICON_PATH;
+
+ /**
+ * The feature id for the '<em><b>Default</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_ENTRY__DEFAULT = TOOL_ENTRY__DEFAULT;
+
+ /**
+ * The feature id for the '<em><b>Gen Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_ENTRY__GEN_NODE = TOOL_ENTRY_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Group</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_ENTRY__GROUP = TOOL_ENTRY_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the the '<em>Node Entry</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_ENTRY_FEATURE_COUNT = TOOL_ENTRY_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.LinkEntryImpl <em>Link Entry</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.LinkEntryImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getLinkEntry()
+ * @generated
+ */
+ int LINK_ENTRY = 13;
+
+ /**
+ * The feature id for the '<em><b>Order</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK_ENTRY__ORDER = TOOL_ENTRY__ORDER;
+
+ /**
+ * The feature id for the '<em><b>Title Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK_ENTRY__TITLE_KEY = TOOL_ENTRY__TITLE_KEY;
+
+ /**
+ * The feature id for the '<em><b>Description Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK_ENTRY__DESCRIPTION_KEY = TOOL_ENTRY__DESCRIPTION_KEY;
+
+ /**
+ * The feature id for the '<em><b>Large Icon Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK_ENTRY__LARGE_ICON_PATH = TOOL_ENTRY__LARGE_ICON_PATH;
+
+ /**
+ * The feature id for the '<em><b>Small Icon Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK_ENTRY__SMALL_ICON_PATH = TOOL_ENTRY__SMALL_ICON_PATH;
+
+ /**
+ * The feature id for the '<em><b>Default</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK_ENTRY__DEFAULT = TOOL_ENTRY__DEFAULT;
+
+ /**
+ * The feature id for the '<em><b>Gen Link</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK_ENTRY__GEN_LINK = TOOL_ENTRY_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Group</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK_ENTRY__GROUP = TOOL_ENTRY_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the the '<em>Link Entry</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK_ENTRY_FEATURE_COUNT = TOOL_ENTRY_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.ToolGroupImpl <em>Tool Group</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.ToolGroupImpl
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getToolGroup()
+ * @generated
+ */
+ int TOOL_GROUP = 14;
+
+ /**
+ * The feature id for the '<em><b>Order</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_GROUP__ORDER = ENTRY_BASE__ORDER;
+
+ /**
+ * The feature id for the '<em><b>Title Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_GROUP__TITLE_KEY = ENTRY_BASE__TITLE_KEY;
+
+ /**
+ * The feature id for the '<em><b>Description Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_GROUP__DESCRIPTION_KEY = ENTRY_BASE__DESCRIPTION_KEY;
+
+ /**
+ * The feature id for the '<em><b>Large Icon Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_GROUP__LARGE_ICON_PATH = ENTRY_BASE__LARGE_ICON_PATH;
+
+ /**
+ * The feature id for the '<em><b>Small Icon Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_GROUP__SMALL_ICON_PATH = ENTRY_BASE__SMALL_ICON_PATH;
+
+ /**
+ * The feature id for the '<em><b>Node Tools</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_GROUP__NODE_TOOLS = ENTRY_BASE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Link Tools</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_GROUP__LINK_TOOLS = ENTRY_BASE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Palette</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_GROUP__PALETTE = ENTRY_BASE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the the '<em>Tool Group</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TOOL_GROUP_FEATURE_COUNT = ENTRY_BASE_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.CompartmentPlacementKind <em>Compartment Placement Kind</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.CompartmentPlacementKind
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getCompartmentPlacementKind()
+ * @generated
+ */
+ int COMPARTMENT_PLACEMENT_KIND = 15;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.CompartmentLayoutKind <em>Compartment Layout Kind</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.CompartmentLayoutKind
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getCompartmentLayoutKind()
+ * @generated
+ */
+ int COMPARTMENT_LAYOUT_KIND = 16;
+
+ /**
+ * The meta object id for the '<em>String Array</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.codegen.gmfgen.impl.GMFGenPackageImpl#getStringArray()
+ * @generated
+ */
+ int STRING_ARRAY = 17;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram <em>Gen Diagram</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Gen Diagram</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram
+ * @generated
+ */
+ EClass getGenDiagram();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getDomainMetaModel <em>Domain Meta Model</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Domain Meta Model</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getDomainMetaModel()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EReference getGenDiagram_DomainMetaModel();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEmfGenModel <em>Emf Gen Model</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Emf Gen Model</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEmfGenModel()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EReference getGenDiagram_EmfGenModel();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getDomainDiagramElement <em>Domain Diagram Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Domain Diagram Element</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getDomainDiagramElement()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EReference getGenDiagram_DomainDiagramElement();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getNodes <em>Nodes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Nodes</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getNodes()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EReference getGenDiagram_Nodes();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getLinks <em>Links</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Links</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getLinks()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EReference getGenDiagram_Links();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPalette <em>Palette</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Palette</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPalette()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EReference getGenDiagram_Palette();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditPartsPackageName <em>Edit Parts Package Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Edit Parts Package Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditPartsPackageName()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EAttribute getGenDiagram_EditPartsPackageName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getCommandsPackageName <em>Commands Package Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Commands Package Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getCommandsPackageName()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EAttribute getGenDiagram_CommandsPackageName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditProvidersPackageName <em>Edit Providers Package Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Edit Providers Package Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditProvidersPackageName()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EAttribute getGenDiagram_EditProvidersPackageName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPluginName <em>Plugin Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Plugin Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPluginName()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EAttribute getGenDiagram_PluginName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getProviderName <em>Provider Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Provider Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getProviderName()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EAttribute getGenDiagram_ProviderName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPluginID <em>Plugin ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Plugin ID</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPluginID()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EAttribute getGenDiagram_PluginID();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPluginClassName <em>Plugin Class Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Plugin Class Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPluginClassName()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EAttribute getGenDiagram_PluginClassName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditorPackageName <em>Editor Package Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Editor Package Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditorPackageName()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EAttribute getGenDiagram_EditorPackageName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditorClassName <em>Editor Class Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Editor Class Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditorClassName()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EAttribute getGenDiagram_EditorClassName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditPartFactoryClassName <em>Edit Part Factory Class Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Edit Part Factory Class Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditPartFactoryClassName()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EAttribute getGenDiagram_EditPartFactoryClassName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getMetaInfoFactoryClassName <em>Meta Info Factory Class Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Meta Info Factory Class Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getMetaInfoFactoryClassName()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EAttribute getGenDiagram_MetaInfoFactoryClassName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#isHasDomainModel <em>Has Domain Model</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Has Domain Model</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#isHasDomainModel()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EAttribute getGenDiagram_HasDomainModel();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getDiagramFileExtension <em>Diagram File Extension</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Diagram File Extension</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#getDiagramFileExtension()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EAttribute getGenDiagram_DiagramFileExtension();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#isSameFileForDiagramAndModel <em>Same File For Diagram And Model</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Same File For Diagram And Model</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenDiagram#isSameFileForDiagramAndModel()
+ * @see #getGenDiagram()
+ * @generated
+ */
+ EAttribute getGenDiagram_SameFileForDiagramAndModel();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase <em>Gen Common Base</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Gen Common Base</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenCommonBase
+ * @generated
+ */
+ EClass getGenCommonBase();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getDiagramRunTimeClass <em>Diagram Run Time Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Diagram Run Time Class</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getDiagramRunTimeClass()
+ * @see #getGenCommonBase()
+ * @generated
+ */
+ EReference getGenCommonBase_DiagramRunTimeClass();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getVisualID <em>Visual ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Visual ID</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getVisualID()
+ * @see #getGenCommonBase()
+ * @generated
+ */
+ EAttribute getGenCommonBase_VisualID();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getEditPartClassName <em>Edit Part Class Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Edit Part Class Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getEditPartClassName()
+ * @see #getGenCommonBase()
+ * @generated
+ */
+ EAttribute getGenCommonBase_EditPartClassName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getMetaInfoProviderClassName <em>Meta Info Provider Class Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Meta Info Provider Class Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getMetaInfoProviderClassName()
+ * @see #getGenCommonBase()
+ * @generated
+ */
+ EAttribute getGenCommonBase_MetaInfoProviderClassName();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.GenBaseElement <em>Gen Base Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Gen Base Element</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenBaseElement
+ * @generated
+ */
+ EClass getGenBaseElement();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.GenBaseElement#getDomainNameFeature <em>Domain Name Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Domain Name Feature</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenBaseElement#getDomainNameFeature()
+ * @see #getGenBaseElement()
+ * @generated
+ */
+ EReference getGenBaseElement_DomainNameFeature();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenBaseElement#getForegroundColor <em>Foreground Color</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Foreground Color</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenBaseElement#getForegroundColor()
+ * @see #getGenBaseElement()
+ * @generated
+ */
+ EAttribute getGenBaseElement_ForegroundColor();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.GenBaseElement#getContainmentMetaFeature <em>Containment Meta Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Containment Meta Feature</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenBaseElement#getContainmentMetaFeature()
+ * @see #getGenBaseElement()
+ * @generated
+ */
+ EReference getGenBaseElement_ContainmentMetaFeature();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.GenNode <em>Gen Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Gen Node</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenNode
+ * @generated
+ */
+ EClass getGenNode();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.gmf.codegen.gmfgen.GenNode#getDiagram <em>Diagram</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Diagram</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenNode#getDiagram()
+ * @see #getGenNode()
+ * @generated
+ */
+ EReference getGenNode_Diagram();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.GenNode#getDomainMetaClass <em>Domain Meta Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Domain Meta Class</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenNode#getDomainMetaClass()
+ * @see #getGenNode()
+ * @generated
+ */
+ EReference getGenNode_DomainMetaClass();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenNode#getViewmapURI <em>Viewmap URI</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Viewmap URI</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenNode#getViewmapURI()
+ * @see #getGenNode()
+ * @generated
+ */
+ EAttribute getGenNode_ViewmapURI();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenNode#getNodeVisualizationKind <em>Node Visualization Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Node Visualization Kind</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenNode#getNodeVisualizationKind()
+ * @see #getGenNode()
+ * @generated
+ */
+ EAttribute getGenNode_NodeVisualizationKind();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenNode#getViewmapClass <em>Viewmap Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Viewmap Class</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenNode#getViewmapClass()
+ * @see #getGenNode()
+ * @generated
+ */
+ EAttribute getGenNode_ViewmapClass();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.gmf.codegen.gmfgen.GenNode#getAffixedStereotypes <em>Affixed Stereotypes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Affixed Stereotypes</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenNode#getAffixedStereotypes()
+ * @see #getGenNode()
+ * @generated
+ */
+ EAttribute getGenNode_AffixedStereotypes();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenNode#getBackgroundColor <em>Background Color</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Background Color</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenNode#getBackgroundColor()
+ * @see #getGenNode()
+ * @generated
+ */
+ EAttribute getGenNode_BackgroundColor();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.codegen.gmfgen.GenNode#getChildContainers <em>Child Containers</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Child Containers</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenNode#getChildContainers()
+ * @see #getGenNode()
+ * @generated
+ */
+ EReference getGenNode_ChildContainers();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.codegen.gmfgen.GenNode#getChildNodes <em>Child Nodes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Child Nodes</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenNode#getChildNodes()
+ * @see #getGenNode()
+ * @generated
+ */
+ EReference getGenNode_ChildNodes();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenNode#getChildContainersPlacement <em>Child Containers Placement</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Child Containers Placement</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenNode#getChildContainersPlacement()
+ * @see #getGenNode()
+ * @generated
+ */
+ EAttribute getGenNode_ChildContainersPlacement();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.GenChildNode <em>Gen Child Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Gen Child Node</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenChildNode
+ * @generated
+ */
+ EClass getGenChildNode();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenChildNode#getGroupID <em>Group ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Group ID</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenChildNode#getGroupID()
+ * @see #getGenChildNode()
+ * @generated
+ */
+ EAttribute getGenChildNode_GroupID();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.gmf.codegen.gmfgen.GenChildNode#getParentNode <em>Parent Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Parent Node</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenChildNode#getParentNode()
+ * @see #getGenChildNode()
+ * @generated
+ */
+ EReference getGenChildNode_ParentNode();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.GenChildNode#getChildMetaFeature <em>Child Meta Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Child Meta Feature</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenChildNode#getChildMetaFeature()
+ * @see #getGenChildNode()
+ * @generated
+ */
+ EReference getGenChildNode_ChildMetaFeature();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer <em>Gen Child Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Gen Child Container</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenChildContainer
+ * @generated
+ */
+ EClass getGenChildContainer();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#getGroupID <em>Group ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Group ID</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenChildContainer#getGroupID()
+ * @see #getGenChildContainer()
+ * @generated
+ */
+ EAttribute getGenChildContainer_GroupID();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#getTitleKey <em>Title Key</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Title Key</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenChildContainer#getTitleKey()
+ * @see #getGenChildContainer()
+ * @generated
+ */
+ EAttribute getGenChildContainer_TitleKey();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#isCanCollapse <em>Can Collapse</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Can Collapse</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenChildContainer#isCanCollapse()
+ * @see #getGenChildContainer()
+ * @generated
+ */
+ EAttribute getGenChildContainer_CanCollapse();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#isHideIfEmpty <em>Hide If Empty</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Hide If Empty</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenChildContainer#isHideIfEmpty()
+ * @see #getGenChildContainer()
+ * @generated
+ */
+ EAttribute getGenChildContainer_HideIfEmpty();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#isNeedsTitle <em>Needs Title</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Needs Title</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenChildContainer#isNeedsTitle()
+ * @see #getGenChildContainer()
+ * @generated
+ */
+ EAttribute getGenChildContainer_NeedsTitle();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#getLayoutKind <em>Layout Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Layout Kind</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenChildContainer#getLayoutKind()
+ * @see #getGenChildContainer()
+ * @generated
+ */
+ EAttribute getGenChildContainer_LayoutKind();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.GenLink <em>Gen Link</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Gen Link</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenLink
+ * @generated
+ */
+ EClass getGenLink();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.gmf.codegen.gmfgen.GenLink#getDiagram <em>Diagram</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Diagram</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenLink#getDiagram()
+ * @see #getGenLink()
+ * @generated
+ */
+ EReference getGenLink_Diagram();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.GenLink#getDomainLinkTargetFeature <em>Domain Link Target Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Domain Link Target Feature</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenLink#getDomainLinkTargetFeature()
+ * @see #getGenLink()
+ * @generated
+ */
+ EReference getGenLink_DomainLinkTargetFeature();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenLink#getLineStyle <em>Line Style</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Line Style</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenLink#getLineStyle()
+ * @see #getGenLink()
+ * @generated
+ */
+ EAttribute getGenLink_LineStyle();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenLink#getFigureQualifiedClassName <em>Figure Qualified Class Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Figure Qualified Class Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenLink#getFigureQualifiedClassName()
+ * @see #getGenLink()
+ * @generated
+ */
+ EAttribute getGenLink_FigureQualifiedClassName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenLink#getSourceDecorationFigureQualifiedClassName <em>Source Decoration Figure Qualified Class Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Source Decoration Figure Qualified Class Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenLink#getSourceDecorationFigureQualifiedClassName()
+ * @see #getGenLink()
+ * @generated
+ */
+ EAttribute getGenLink_SourceDecorationFigureQualifiedClassName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.GenLink#getTargetDecorationFigureQualifiedClassName <em>Target Decoration Figure Qualified Class Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Target Decoration Figure Qualified Class Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenLink#getTargetDecorationFigureQualifiedClassName()
+ * @see #getGenLink()
+ * @generated
+ */
+ EAttribute getGenLink_TargetDecorationFigureQualifiedClassName();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.GenLinkWithClass <em>Gen Link With Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Gen Link With Class</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenLinkWithClass
+ * @generated
+ */
+ EClass getGenLinkWithClass();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.GenLinkWithClass#getDomainMetaClass <em>Domain Meta Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Domain Meta Class</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenLinkWithClass#getDomainMetaClass()
+ * @see #getGenLinkWithClass()
+ * @generated
+ */
+ EReference getGenLinkWithClass_DomainMetaClass();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.GenLinkWithClass#getLinkContainerFeature <em>Link Container Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Link Container Feature</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenLinkWithClass#getLinkContainerFeature()
+ * @see #getGenLinkWithClass()
+ * @generated
+ */
+ EReference getGenLinkWithClass_LinkContainerFeature();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.GenLinkReferenceOnly <em>Gen Link Reference Only</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Gen Link Reference Only</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.GenLinkReferenceOnly
+ * @generated
+ */
+ EClass getGenLinkReferenceOnly();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.Palette <em>Palette</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Palette</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.Palette
+ * @generated
+ */
+ EClass getPalette();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.gmf.codegen.gmfgen.Palette#getDiagram <em>Diagram</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Diagram</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.Palette#getDiagram()
+ * @see #getPalette()
+ * @generated
+ */
+ EReference getPalette_Diagram();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.codegen.gmfgen.Palette#getGroups <em>Groups</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Groups</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.Palette#getGroups()
+ * @see #getPalette()
+ * @generated
+ */
+ EReference getPalette_Groups();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.Palette#isFlyout <em>Flyout</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Flyout</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.Palette#isFlyout()
+ * @see #getPalette()
+ * @generated
+ */
+ EAttribute getPalette_Flyout();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.Palette#isNeedZoomTools <em>Need Zoom Tools</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Need Zoom Tools</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.Palette#isNeedZoomTools()
+ * @see #getPalette()
+ * @generated
+ */
+ EAttribute getPalette_NeedZoomTools();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.Palette#getPackageName <em>Package Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Package Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.Palette#getPackageName()
+ * @see #getPalette()
+ * @generated
+ */
+ EAttribute getPalette_PackageName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.Palette#getFactoryClassName <em>Factory Class Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Factory Class Name</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.Palette#getFactoryClassName()
+ * @see #getPalette()
+ * @generated
+ */
+ EAttribute getPalette_FactoryClassName();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.EntryBase <em>Entry Base</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Entry Base</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.EntryBase
+ * @generated
+ */
+ EClass getEntryBase();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getOrder <em>Order</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Order</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.EntryBase#getOrder()
+ * @see #getEntryBase()
+ * @generated
+ */
+ EAttribute getEntryBase_Order();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getTitleKey <em>Title Key</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Title Key</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.EntryBase#getTitleKey()
+ * @see #getEntryBase()
+ * @generated
+ */
+ EAttribute getEntryBase_TitleKey();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getDescriptionKey <em>Description Key</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Description Key</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.EntryBase#getDescriptionKey()
+ * @see #getEntryBase()
+ * @generated
+ */
+ EAttribute getEntryBase_DescriptionKey();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getLargeIconPath <em>Large Icon Path</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Large Icon Path</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.EntryBase#getLargeIconPath()
+ * @see #getEntryBase()
+ * @generated
+ */
+ EAttribute getEntryBase_LargeIconPath();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.EntryBase#getSmallIconPath <em>Small Icon Path</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Small Icon Path</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.EntryBase#getSmallIconPath()
+ * @see #getEntryBase()
+ * @generated
+ */
+ EAttribute getEntryBase_SmallIconPath();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.ToolEntry <em>Tool Entry</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Tool Entry</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.ToolEntry
+ * @generated
+ */
+ EClass getToolEntry();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.gmf.codegen.gmfgen.ToolEntry#isDefault <em>Default</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Default</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.ToolEntry#isDefault()
+ * @see #getToolEntry()
+ * @generated
+ */
+ EAttribute getToolEntry_Default();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.NodeEntry <em>Node Entry</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Node Entry</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.NodeEntry
+ * @generated
+ */
+ EClass getNodeEntry();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.NodeEntry#getGenNode <em>Gen Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Gen Node</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.NodeEntry#getGenNode()
+ * @see #getNodeEntry()
+ * @generated
+ */
+ EReference getNodeEntry_GenNode();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.gmf.codegen.gmfgen.NodeEntry#getGroup <em>Group</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Group</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.NodeEntry#getGroup()
+ * @see #getNodeEntry()
+ * @generated
+ */
+ EReference getNodeEntry_Group();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.LinkEntry <em>Link Entry</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Link Entry</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.LinkEntry
+ * @generated
+ */
+ EClass getLinkEntry();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.LinkEntry#getGenLink <em>Gen Link</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Gen Link</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.LinkEntry#getGenLink()
+ * @see #getLinkEntry()
+ * @generated
+ */
+ EReference getLinkEntry_GenLink();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.gmf.codegen.gmfgen.LinkEntry#getGroup <em>Group</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Group</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.LinkEntry#getGroup()
+ * @see #getLinkEntry()
+ * @generated
+ */
+ EReference getLinkEntry_Group();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.ToolGroup <em>Tool Group</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Tool Group</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.ToolGroup
+ * @generated
+ */
+ EClass getToolGroup();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.codegen.gmfgen.ToolGroup#getNodeTools <em>Node Tools</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Node Tools</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.ToolGroup#getNodeTools()
+ * @see #getToolGroup()
+ * @generated
+ */
+ EReference getToolGroup_NodeTools();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.codegen.gmfgen.ToolGroup#getLinkTools <em>Link Tools</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Link Tools</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.ToolGroup#getLinkTools()
+ * @see #getToolGroup()
+ * @generated
+ */
+ EReference getToolGroup_LinkTools();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.gmf.codegen.gmfgen.ToolGroup#getPalette <em>Palette</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Palette</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.ToolGroup#getPalette()
+ * @see #getToolGroup()
+ * @generated
+ */
+ EReference getToolGroup_Palette();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.gmf.codegen.gmfgen.CompartmentPlacementKind <em>Compartment Placement Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Compartment Placement Kind</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.CompartmentPlacementKind
+ * @generated
+ */
+ EEnum getCompartmentPlacementKind();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.gmf.codegen.gmfgen.CompartmentLayoutKind <em>Compartment Layout Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Compartment Layout Kind</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.CompartmentLayoutKind
+ * @generated
+ */
+ EEnum getCompartmentLayoutKind();
+
+ /**
+ * Returns the meta object for data type '<em>String Array</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>String Array</em>'.
+ * @model instanceClass="String[]"
+ * @generated
+ */
+ EDataType getStringArray();
+
+ /**
+ * 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
+ */
+ GMFGenFactory getGMFGenFactory();
+
+} //GMFGenPackage
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenBaseElement.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenBaseElement.java
new file mode 100644
index 000000000..7ba5ce0ea
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenBaseElement.java
@@ -0,0 +1,121 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Gen Base Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * would be better to call this one GenBaseDiagramElement, as it is for elements placed on the canvas
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenBaseElement#getDomainNameFeature <em>Domain Name Feature</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenBaseElement#getForegroundColor <em>Foreground Color</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenBaseElement#getContainmentMetaFeature <em>Containment Meta Feature</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenBaseElement()
+ * @model abstract="true"
+ * @generated
+ */
+public interface GenBaseElement extends GenCommonBase{
+ /**
+ * Returns the value of the '<em><b>Domain Name Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Domain Name Feature</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Domain Name Feature</em>' reference.
+ * @see #setDomainNameFeature(EAttribute)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenBaseElement_DomainNameFeature()
+ * @model
+ * @generated
+ */
+ EAttribute getDomainNameFeature();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenBaseElement#getDomainNameFeature <em>Domain Name Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Domain Name Feature</em>' reference.
+ * @see #getDomainNameFeature()
+ * @generated
+ */
+ void setDomainNameFeature(EAttribute value);
+
+ /**
+ * Returns the value of the '<em><b>Foreground Color</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Foreground Color</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Foreground Color</em>' attribute.
+ * @see #setForegroundColor(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenBaseElement_ForegroundColor()
+ * @model
+ * @generated
+ */
+ String getForegroundColor();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenBaseElement#getForegroundColor <em>Foreground Color</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Foreground Color</em>' attribute.
+ * @see #getForegroundColor()
+ * @generated
+ */
+ void setForegroundColor(String value);
+
+ /**
+ * Returns the value of the '<em><b>Containment Meta Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Containment Meta Feature</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Containment Meta Feature</em>' reference.
+ * @see #setContainmentMetaFeature(EReference)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenBaseElement_ContainmentMetaFeature()
+ * @model annotation="http://www.eclipse.org/gmf/2005/constraints ocl='containmentFeature.isContainment'"
+ * @generated
+ */
+ EReference getContainmentMetaFeature();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenBaseElement#getContainmentMetaFeature <em>Containment Meta Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Containment Meta Feature</em>' reference.
+ * @see #getContainmentMetaFeature()
+ * @generated
+ */
+ void setContainmentMetaFeature(EReference value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ boolean hasNameToEdit();
+
+} // GenBaseElement
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenChildContainer.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenChildContainer.java
new file mode 100644
index 000000000..854981c64
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenChildContainer.java
@@ -0,0 +1,199 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Gen Child Container</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * Child container within node. Compartment, iow.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#getGroupID <em>Group ID</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#getTitleKey <em>Title Key</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#isCanCollapse <em>Can Collapse</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#isHideIfEmpty <em>Hide If Empty</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#isNeedsTitle <em>Needs Title</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#getLayoutKind <em>Layout Kind</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenChildContainer()
+ * @model
+ * @generated
+ */
+public interface GenChildContainer extends EObject {
+ /**
+ * Returns the value of the '<em><b>Group ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Group ID</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Group ID</em>' attribute.
+ * @see #setGroupID(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenChildContainer_GroupID()
+ * @model
+ * @generated
+ */
+ String getGroupID();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#getGroupID <em>Group ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Group ID</em>' attribute.
+ * @see #getGroupID()
+ * @generated
+ */
+ void setGroupID(String value);
+
+ /**
+ * Returns the value of the '<em><b>Title Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Title Key</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Title Key</em>' attribute.
+ * @see #setTitleKey(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenChildContainer_TitleKey()
+ * @model
+ * @generated
+ */
+ String getTitleKey();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#getTitleKey <em>Title Key</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Title Key</em>' attribute.
+ * @see #getTitleKey()
+ * @generated
+ */
+ void setTitleKey(String value);
+
+ /**
+ * Returns the value of the '<em><b>Can Collapse</b></em>' attribute.
+ * The default value is <code>"true"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Can Collapse</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Can Collapse</em>' attribute.
+ * @see #setCanCollapse(boolean)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenChildContainer_CanCollapse()
+ * @model default="true"
+ * @generated
+ */
+ boolean isCanCollapse();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#isCanCollapse <em>Can Collapse</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Can Collapse</em>' attribute.
+ * @see #isCanCollapse()
+ * @generated
+ */
+ void setCanCollapse(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Hide If Empty</b></em>' attribute.
+ * The default value is <code>"true"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Hide If Empty</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Hide If Empty</em>' attribute.
+ * @see #setHideIfEmpty(boolean)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenChildContainer_HideIfEmpty()
+ * @model default="true"
+ * @generated
+ */
+ boolean isHideIfEmpty();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#isHideIfEmpty <em>Hide If Empty</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Hide If Empty</em>' attribute.
+ * @see #isHideIfEmpty()
+ * @generated
+ */
+ void setHideIfEmpty(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Needs Title</b></em>' attribute.
+ * The default value is <code>"true"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Needs Title</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Needs Title</em>' attribute.
+ * @see #setNeedsTitle(boolean)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenChildContainer_NeedsTitle()
+ * @model default="true"
+ * @generated
+ */
+ boolean isNeedsTitle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#isNeedsTitle <em>Needs Title</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Needs Title</em>' attribute.
+ * @see #isNeedsTitle()
+ * @generated
+ */
+ void setNeedsTitle(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Layout Kind</b></em>' attribute.
+ * The literals are from the enumeration {@link org.eclipse.gmf.codegen.gmfgen.CompartmentLayoutKind}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Layout Kind</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Layout Kind</em>' attribute.
+ * @see org.eclipse.gmf.codegen.gmfgen.CompartmentLayoutKind
+ * @see #setLayoutKind(CompartmentLayoutKind)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenChildContainer_LayoutKind()
+ * @model
+ * @generated
+ */
+ CompartmentLayoutKind getLayoutKind();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenChildContainer#getLayoutKind <em>Layout Kind</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Layout Kind</em>' attribute.
+ * @see org.eclipse.gmf.codegen.gmfgen.CompartmentLayoutKind
+ * @see #getLayoutKind()
+ * @generated
+ */
+ void setLayoutKind(CompartmentLayoutKind value);
+
+} // GenChildContainer
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenChildNode.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenChildNode.java
new file mode 100644
index 000000000..1b1385ba6
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenChildNode.java
@@ -0,0 +1,98 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen;
+
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Gen Child Node</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenChildNode#getGroupID <em>Group ID</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenChildNode#getParentNode <em>Parent Node</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenChildNode#getChildMetaFeature <em>Child Meta Feature</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenChildNode()
+ * @model
+ * @generated
+ */
+public interface GenChildNode extends GenNode {
+ /**
+ * Returns the value of the '<em><b>Group ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * could be null if you don't use childContainers
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Group ID</em>' attribute.
+ * @see #setGroupID(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenChildNode_GroupID()
+ * @model
+ * @generated
+ */
+ String getGroupID();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenChildNode#getGroupID <em>Group ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Group ID</em>' attribute.
+ * @see #getGroupID()
+ * @generated
+ */
+ void setGroupID(String value);
+
+ /**
+ * Returns the value of the '<em><b>Parent Node</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.gmf.codegen.gmfgen.GenNode#getChildNodes <em>Child Nodes</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parent Node</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Parent Node</em>' container reference.
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenChildNode_ParentNode()
+ * @see org.eclipse.gmf.codegen.gmfgen.GenNode#getChildNodes
+ * @model opposite="childNodes" required="true" changeable="false"
+ * @generated
+ */
+ GenNode getParentNode();
+
+ /**
+ * Returns the value of the '<em><b>Child Meta Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Child Meta Feature</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Child Meta Feature</em>' reference.
+ * @see #setChildMetaFeature(EReference)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenChildNode_ChildMetaFeature()
+ * @model required="true"
+ * @generated
+ */
+ EReference getChildMetaFeature();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenChildNode#getChildMetaFeature <em>Child Meta Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Child Meta Feature</em>' reference.
+ * @see #getChildMetaFeature()
+ * @generated
+ */
+ void setChildMetaFeature(EReference value);
+
+} // GenChildNode
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenCommonBase.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenCommonBase.java
new file mode 100644
index 000000000..f75bcbd62
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenCommonBase.java
@@ -0,0 +1,191 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Gen Common Base</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * One that combines attributes that are essential for EditPart
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getDiagramRunTimeClass <em>Diagram Run Time Class</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getVisualID <em>Visual ID</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getEditPartClassName <em>Edit Part Class Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getMetaInfoProviderClassName <em>Meta Info Provider Class Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenCommonBase()
+ * @model abstract="true"
+ * @generated
+ */
+public interface GenCommonBase extends EObject{
+ /**
+ * Returns the value of the '<em><b>Diagram Run Time Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Diagram Run Time Class</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Diagram Run Time Class</em>' reference.
+ * @see #setDiagramRunTimeClass(GenClass)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenCommonBase_DiagramRunTimeClass()
+ * @model required="true"
+ * @generated
+ */
+ GenClass getDiagramRunTimeClass();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getDiagramRunTimeClass <em>Diagram Run Time Class</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Diagram Run Time Class</em>' reference.
+ * @see #getDiagramRunTimeClass()
+ * @generated
+ */
+ void setDiagramRunTimeClass(GenClass value);
+
+ /**
+ * Returns the value of the '<em><b>Visual ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * way to decide which editpart to use for specific diagram element. Maps to attribute in DRT.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Visual ID</em>' attribute.
+ * @see #setVisualID(int)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenCommonBase_VisualID()
+ * @model required="true"
+ * @generated
+ */
+ int getVisualID();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getVisualID <em>Visual ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Visual ID</em>' attribute.
+ * @see #getVisualID()
+ * @generated
+ */
+ void setVisualID(int value);
+
+ /**
+ * Returns the value of the '<em><b>Edit Part Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Edit Part Class 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>Edit Part Class Name</em>' attribute.
+ * @see #setEditPartClassName(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenCommonBase_EditPartClassName()
+ * @model
+ * @generated
+ */
+ String getEditPartClassName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getEditPartClassName <em>Edit Part Class Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Edit Part Class Name</em>' attribute.
+ * @see #getEditPartClassName()
+ * @generated
+ */
+ void setEditPartClassName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Meta Info Provider Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Meta Info Provider Class 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>Meta Info Provider Class Name</em>' attribute.
+ * @see #setMetaInfoProviderClassName(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenCommonBase_MetaInfoProviderClassName()
+ * @model
+ * @generated
+ */
+ String getMetaInfoProviderClassName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase#getMetaInfoProviderClassName <em>Meta Info Provider Class Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Meta Info Provider Class Name</em>' attribute.
+ * @see #getMetaInfoProviderClassName()
+ * @generated
+ */
+ void setMetaInfoProviderClassName(String value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Meta Info Provider Qualified Class Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ String getMetaInfoProviderQualifiedClassName();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Class Name Prefix</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ String getClassNamePrefix();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Class Name Suffux</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ String getClassNameSuffux();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ String getEditPartQualifiedClassName();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ GenDiagram getDiagram();
+
+} // GenCommonBase
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenDiagram.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenDiagram.java
new file mode 100644
index 000000000..5454a5a94
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenDiagram.java
@@ -0,0 +1,622 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen;
+
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.emf.codegen.ecore.genmodel.GenFeature;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Gen Diagram</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getDomainMetaModel <em>Domain Meta Model</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEmfGenModel <em>Emf Gen Model</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getDomainDiagramElement <em>Domain Diagram Element</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getNodes <em>Nodes</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getLinks <em>Links</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPalette <em>Palette</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditPartsPackageName <em>Edit Parts Package Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getCommandsPackageName <em>Commands Package Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditProvidersPackageName <em>Edit Providers Package Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPluginName <em>Plugin Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getProviderName <em>Provider Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPluginID <em>Plugin ID</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPluginClassName <em>Plugin Class Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditorPackageName <em>Editor Package Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditorClassName <em>Editor Class Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditPartFactoryClassName <em>Edit Part Factory Class Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getMetaInfoFactoryClassName <em>Meta Info Factory Class Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#isHasDomainModel <em>Has Domain Model</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getDiagramFileExtension <em>Diagram File Extension</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#isSameFileForDiagramAndModel <em>Same File For Diagram And Model</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram()
+ * @model annotation="http://www.eclipse.org/emf/2004/EmfaticAnnotationMap constraints='http://www.eclipse.org/gmf/2005/constraints'"
+ * annotation="http://www.eclipse.org/gmf/2005/constraints ocl='nodes->forAll(n : GenNode | self.links->forAll(l : GenLink | l.domainMetaClass <> n.domainMetaClass))'"
+ * @generated
+ */
+public interface GenDiagram extends GenCommonBase {
+ /**
+ * Returns the value of the '<em><b>Domain Meta Model</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Domain Meta Model</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Domain Meta Model</em>' reference.
+ * @see #setDomainMetaModel(EPackage)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram_DomainMetaModel()
+ * @model required="true"
+ * @generated
+ */
+ EPackage getDomainMetaModel();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getDomainMetaModel <em>Domain Meta Model</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Domain Meta Model</em>' reference.
+ * @see #getDomainMetaModel()
+ * @generated
+ */
+ void setDomainMetaModel(EPackage value);
+
+ /**
+ * Returns the value of the '<em><b>Emf Gen Model</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Emf Gen Model</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Emf Gen Model</em>' reference.
+ * @see #setEmfGenModel(GenModel)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram_EmfGenModel()
+ * @model required="true"
+ * @generated
+ */
+ GenModel getEmfGenModel();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEmfGenModel <em>Emf Gen Model</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Emf Gen Model</em>' reference.
+ * @see #getEmfGenModel()
+ * @generated
+ */
+ void setEmfGenModel(GenModel value);
+
+ /**
+ * Returns the value of the '<em><b>Domain Diagram Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Domain Diagram Element</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Domain Diagram Element</em>' reference.
+ * @see #setDomainDiagramElement(EClass)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram_DomainDiagramElement()
+ * @model
+ * @generated
+ */
+ EClass getDomainDiagramElement();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getDomainDiagramElement <em>Domain Diagram Element</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Domain Diagram Element</em>' reference.
+ * @see #getDomainDiagramElement()
+ * @generated
+ */
+ void setDomainDiagramElement(EClass value);
+
+ /**
+ * Returns the value of the '<em><b>Nodes</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.gmf.codegen.gmfgen.GenNode}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.gmf.codegen.gmfgen.GenNode#getDiagram <em>Diagram</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Nodes</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Nodes</em>' containment reference list.
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram_Nodes()
+ * @see org.eclipse.gmf.codegen.gmfgen.GenNode#getDiagram
+ * @model type="org.eclipse.gmf.codegen.gmfgen.GenNode" opposite="diagram" containment="true"
+ * @generated
+ */
+ EList getNodes();
+
+ /**
+ * Returns the value of the '<em><b>Links</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.gmf.codegen.gmfgen.GenLink}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.gmf.codegen.gmfgen.GenLink#getDiagram <em>Diagram</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Links</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Links</em>' containment reference list.
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram_Links()
+ * @see org.eclipse.gmf.codegen.gmfgen.GenLink#getDiagram
+ * @model type="org.eclipse.gmf.codegen.gmfgen.GenLink" opposite="diagram" containment="true"
+ * @generated
+ */
+ EList getLinks();
+
+ /**
+ * Returns the value of the '<em><b>Palette</b></em>' containment reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.gmf.codegen.gmfgen.Palette#getDiagram <em>Diagram</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Palette</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Palette</em>' containment reference.
+ * @see #setPalette(Palette)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram_Palette()
+ * @see org.eclipse.gmf.codegen.gmfgen.Palette#getDiagram
+ * @model opposite="diagram" containment="true" required="true"
+ * @generated
+ */
+ Palette getPalette();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPalette <em>Palette</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Palette</em>' containment reference.
+ * @see #getPalette()
+ * @generated
+ */
+ void setPalette(Palette value);
+
+ /**
+ * Returns the value of the '<em><b>Edit Parts Package Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Edit Parts Package 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>Edit Parts Package Name</em>' attribute.
+ * @see #setEditPartsPackageName(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram_EditPartsPackageName()
+ * @model
+ * @generated
+ */
+ String getEditPartsPackageName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditPartsPackageName <em>Edit Parts Package Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Edit Parts Package Name</em>' attribute.
+ * @see #getEditPartsPackageName()
+ * @generated
+ */
+ void setEditPartsPackageName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Commands Package Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Commands Package 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>Commands Package Name</em>' attribute.
+ * @see #setCommandsPackageName(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram_CommandsPackageName()
+ * @model
+ * @generated
+ */
+ String getCommandsPackageName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getCommandsPackageName <em>Commands Package Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Commands Package Name</em>' attribute.
+ * @see #getCommandsPackageName()
+ * @generated
+ */
+ void setCommandsPackageName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Edit Providers Package Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Edit Providers Package 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>Edit Providers Package Name</em>' attribute.
+ * @see #setEditProvidersPackageName(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram_EditProvidersPackageName()
+ * @model
+ * @generated
+ */
+ String getEditProvidersPackageName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditProvidersPackageName <em>Edit Providers Package Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Edit Providers Package Name</em>' attribute.
+ * @see #getEditProvidersPackageName()
+ * @generated
+ */
+ void setEditProvidersPackageName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Plugin Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Plugin 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>Plugin Name</em>' attribute.
+ * @see #setPluginName(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram_PluginName()
+ * @model
+ * @generated
+ */
+ String getPluginName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPluginName <em>Plugin Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Plugin Name</em>' attribute.
+ * @see #getPluginName()
+ * @generated
+ */
+ void setPluginName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Provider Name</b></em>' attribute.
+ * The default value is <code>"Sample Plugin Provider, Inc"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Provider 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>Provider Name</em>' attribute.
+ * @see #setProviderName(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram_ProviderName()
+ * @model default="Sample Plugin Provider, Inc"
+ * @generated
+ */
+ String getProviderName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getProviderName <em>Provider Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Provider Name</em>' attribute.
+ * @see #getProviderName()
+ * @generated
+ */
+ void setProviderName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Plugin ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Plugin ID</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Plugin ID</em>' attribute.
+ * @see #setPluginID(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram_PluginID()
+ * @model
+ * @generated
+ */
+ String getPluginID();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPluginID <em>Plugin ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Plugin ID</em>' attribute.
+ * @see #getPluginID()
+ * @generated
+ */
+ void setPluginID(String value);
+
+ /**
+ * Returns the value of the '<em><b>Plugin Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Plugin Class 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>Plugin Class Name</em>' attribute.
+ * @see #setPluginClassName(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram_PluginClassName()
+ * @model
+ * @generated
+ */
+ String getPluginClassName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getPluginClassName <em>Plugin Class Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Plugin Class Name</em>' attribute.
+ * @see #getPluginClassName()
+ * @generated
+ */
+ void setPluginClassName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Editor Package Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Editor Package 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>Editor Package Name</em>' attribute.
+ * @see #setEditorPackageName(String)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getGenDiagram_EditorPackageName()
+ * @model
+ * @generated
+ */
+ String getEditorPackageName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.GenDiagram#getEditorPackageName <em>Editor Package Name</em>}' attribute.
+ * <!-- begin-user-doc -->