Bug 352288: test sample setup for top-level / inner phantoms
+ test fixed

Change-Id: I62dfa66a40a8d25ec4aa940cd3d20fefe2d432be
diff --git a/plugins/org.eclipse.gmf.codegen.xtend/xtend/xpt/diagram/editpolicies/Utils_qvto.xtend b/plugins/org.eclipse.gmf.codegen.xtend/xtend/xpt/diagram/editpolicies/Utils_qvto.xtend
index 649754b..86fa080 100644
--- a/plugins/org.eclipse.gmf.codegen.xtend/xtend/xpt/diagram/editpolicies/Utils_qvto.xtend
+++ b/plugins/org.eclipse.gmf.codegen.xtend/xtend/xpt/diagram/editpolicies/Utils_qvto.xtend
@@ -120,8 +120,10 @@
 	 * if child's containment feature comes from the node, assume deletion of the parent would delete the child.
 	 */
 	def boolean isDirectlyOwned(GenChildNode child, GenNode genNode) {
-		if(child.modelFacet == null || genNode.modelFacet == null) return false;
-		return child.modelFacet.containmentMetaFeature.genClass.isSuperTypeOf(genNode.modelFacet.metaClass)
+		var childFacet = child.modelFacet;
+		if (childFacet == null || genNode.modelFacet == null) return false;
+		if (childFacet.containmentMetaFeature == null) return false;
+		return childFacet.containmentMetaFeature.genClass.isSuperTypeOf(genNode.modelFacet.metaClass)
 	}
 
 }
diff --git a/plugins/org.eclipse.gmf.codegen.xtend/xtend/xpt/diagram/updater/DiagramUpdater.xtend b/plugins/org.eclipse.gmf.codegen.xtend/xtend/xpt/diagram/updater/DiagramUpdater.xtend
index 8d6288e..3e1c760 100644
--- a/plugins/org.eclipse.gmf.codegen.xtend/xtend/xpt/diagram/updater/DiagramUpdater.xtend
+++ b/plugins/org.eclipse.gmf.codegen.xtend/xtend/xpt/diagram/updater/DiagramUpdater.xtend
@@ -191,7 +191,7 @@
 			«ENDFOR»
 			«IF it.getPhantomNodes.notEmpty»
 				org.eclipse.emf.ecore.resource.Resource resource = modelElement.eResource();
-				for (java.util.Iterator<org.eclipse.emf.ecore.EObject> it = getPhantomNodesIterator(resource)) {
+				for (java.util.Iterator<org.eclipse.emf.ecore.EObject> it = getPhantomNodesIterator(resource); it.hasNext();) {
 					org.eclipse.emf.ecore.EObject childElement = it.next();
 					if (childElement == modelElement) {
 						continue;
@@ -249,7 +249,7 @@
 
 
 	def getPhantomNodesIterator(GenDiagramUpdater it) '''
-	«IF editorGen.diagram.phantomNodes.notEmpty»
+	«IF editorGen.diagram.hasPhantomNodes»
 	
 	«generatedMemberComment»
 	private static java.util.Iterator<org.eclipse.emf.ecore.EObject> getPhantomNodesIterator(org.eclipse.emf.ecore.resource.Resource resource) {
diff --git a/plugins/org.eclipse.gmf.codegen.xtend/xtend/xpt/diagram/updater/Utils_qvto.xtend b/plugins/org.eclipse.gmf.codegen.xtend/xtend/xpt/diagram/updater/Utils_qvto.xtend
index 0514b48..4ca377c 100644
--- a/plugins/org.eclipse.gmf.codegen.xtend/xtend/xpt/diagram/updater/Utils_qvto.xtend
+++ b/plugins/org.eclipse.gmf.codegen.xtend/xtend/xpt/diagram/updater/Utils_qvto.xtend
@@ -167,12 +167,30 @@
 		return getSemanticChildren(containerBase).filter[node|!node.modelFacet.isPhantomElement()]
 	}
 
+	def boolean hasPhantomNodes(GenDiagram it) {
+		if (it.phantomNodes.notEmpty) return true; 
+		for (GenNode node: it.allNodes) {
+			if (node.phantomNodes.notEmpty) {
+				return true;
+			}
+		}
+		return false;
+	}
+
 	def dispatch Iterable<GenNode> getPhantomNodes(GenContainerBase it) {
 		return <GenNode>newLinkedList()
 	}
 
 	def dispatch Iterable<GenNode> getPhantomNodes(GenNode it) {
-		return getSemanticChildren(it).filter[node|node.modelFacet.isPhantomElement()]
+		return getPhantomNodesForContainers(it)
+	}
+
+	def dispatch Iterable<GenNode> getPhantomNodes(GenDiagram it) {
+		return getPhantomNodesForContainers(it)
+	}
+
+	def Iterable<GenNode> getPhantomNodesForContainers(GenContainerBase it) {
+		getSemanticChildren(it).filter[node|node.modelFacet.isPhantomElement()]
 	}
 
 	def Iterable<GenNode> getSemanticChildren(GenContainerBase containerBase) {
diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.classpath b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.classpath
new file mode 100755
index 0000000..ad32c83
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.gitignore b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.gitignore
new file mode 100755
index 0000000..7985f5e
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.gitignore
@@ -0,0 +1,3 @@
+/bin
+/xtend-gen
+*.java._trace
\ No newline at end of file
diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.project b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.project
new file mode 100755
index 0000000..0f514b2
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<projectDescription>

+	<name>org.eclipse.gmf.tooling.examples.phantoms</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/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.settings/org.eclipse.jdt.core.prefs b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..c537b63
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.settings/phantoms.gmfgen.prefs b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.settings/phantoms.gmfgen.prefs
new file mode 100755
index 0000000..672ea48
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/.settings/phantoms.gmfgen.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1

+generate_rcp=false

+ignore_gmfgen_validation=true

+ignore_mapmodel_validation=true

+use_in_transfo_code_gen=false

+use_map_mode=true

+use_runtime_figures=true

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/META-INF/MANIFEST.MF b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..41ed518
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0

+Bundle-ManifestVersion: 2

+Bundle-Name: %pluginName

+Bundle-SymbolicName: org.eclipse.gmf.tooling.examples.phantoms;singleton:=true

+Bundle-Version: 1.0.0.qualifier

+Bundle-ClassPath: .

+Bundle-Vendor: %providerName

+Bundle-Localization: plugin

+Bundle-RequiredExecutionEnvironment: JavaSE-1.6

+Export-Package: org.eclipse.gmf.tooling.examples.phantoms,

+ org.eclipse.gmf.tooling.examples.phantoms.impl,

+ org.eclipse.gmf.tooling.examples.phantoms.util

+Require-Bundle: org.eclipse.core.runtime,

+ org.eclipse.emf.ecore;visibility:=reexport

+Bundle-ActivationPolicy: lazy

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/build.properties b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/build.properties
new file mode 100755
index 0000000..4d3b182
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/build.properties
@@ -0,0 +1,10 @@
+#

+

+bin.includes = .,\

+               model/,\

+               META-INF/,\

+               plugin.xml,\

+               plugin.properties

+jars.compile.order = .

+source.. = src/

+output.. = bin/

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.ecore b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.ecore
new file mode 100755
index 0000000..13d26c9
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.ecore
@@ -0,0 +1,30 @@
+<?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="phantoms" nsURI="http://org.eclipse.gmf.tooling.examples.phantoms"

+    nsPrefix="phantoms">

+  <eClassifiers xsi:type="ecore:EClass" name="Root">

+    <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"

+        eType="#//RootChild" containment="true"/>

+  </eClassifiers>

+  <eClassifiers xsi:type="ecore:EClass" name="RootChild"/>

+  <eClassifiers xsi:type="ecore:EClass" name="TopParent" eSuperTypes="#//RootChild">

+    <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"

+        eType="#//TopChild" containment="true"/>

+  </eClassifiers>

+  <eClassifiers xsi:type="ecore:EClass" name="Medium" eSuperTypes="#//RootChild">

+    <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"

+        eType="#//MediumParent" containment="true"/>

+  </eClassifiers>

+  <eClassifiers xsi:type="ecore:EClass" name="TopChild">

+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"

+        defaultValueLiteral="TopChild"/>

+  </eClassifiers>

+  <eClassifiers xsi:type="ecore:EClass" name="MediumParent">

+    <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"

+        eType="#//MediumChild" containment="true"/>

+  </eClassifiers>

+  <eClassifiers xsi:type="ecore:EClass" name="MediumChild">

+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"

+        defaultValueLiteral="MediumChild"/>

+  </eClassifiers>

+</ecore:EPackage>

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.genmodel b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.genmodel
new file mode 100755
index 0000000..412af91
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.genmodel
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"

+    xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.gmf.tooling.examples.phantoms/src"

+    editDirectory="/org.eclipse.gmf.tooling.examples.phantoms.edit/src" editorDirectory="/org.eclipse.gmf.tooling.examples.phantoms.editor/src"

+    modelPluginID="org.eclipse.gmf.tooling.examples.phantoms" modelName="Phantoms"

+    rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" importerID="org.eclipse.emf.importer.ecore"

+    complianceLevel="6.0" copyrightFields="false" editPluginID="org.eclipse.gmf.tooling.examples.phantoms.edit"

+    editorPluginID="org.eclipse.gmf.tooling.examples.phantoms.editor" operationReflection="true"

+    importOrganizing="true">

+  <foreignModel>phantoms.ecore</foreignModel>

+  <genPackages prefix="Phantoms" basePackage="org.eclipse.gmf.tooling.examples" disposableProviderFactory="true"

+      ecorePackage="phantoms.ecore#/">

+    <genClasses ecoreClass="phantoms.ecore#//Root">

+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference phantoms.ecore#//Root/children"/>

+    </genClasses>

+    <genClasses ecoreClass="phantoms.ecore#//RootChild"/>

+    <genClasses ecoreClass="phantoms.ecore#//TopParent">

+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference phantoms.ecore#//TopParent/children"/>

+    </genClasses>

+    <genClasses ecoreClass="phantoms.ecore#//Medium">

+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference phantoms.ecore#//Medium/children"/>

+    </genClasses>

+    <genClasses ecoreClass="phantoms.ecore#//TopChild">

+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute phantoms.ecore#//TopChild/name"/>

+    </genClasses>

+    <genClasses ecoreClass="phantoms.ecore#//MediumParent">

+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference phantoms.ecore#//MediumParent/children"/>

+    </genClasses>

+    <genClasses ecoreClass="phantoms.ecore#//MediumChild">

+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute phantoms.ecore#//MediumChild/name"/>

+    </genClasses>

+  </genPackages>

+</genmodel:GenModel>

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.gmfgen b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.gmfgen
new file mode 100755
index 0000000..0aaf336
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.gmfgen
@@ -0,0 +1,423 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<gmfgen:GenEditorGenerator

+    xmi:version="2.0"

+    xmlns:xmi="http://www.omg.org/XMI"

+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

+    xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel">

+  <diagram

+      visualID="1000"

+      editPartClassName="RootEditPart"

+      itemSemanticEditPolicyClassName="RootItemSemanticEditPolicy"

+      canonicalEditPolicyClassName="RootCanonicalEditPolicy"

+      iconProviderPriority="Low"

+      validationProviderPriority="Low">

+    <diagramRunTimeClass

+        href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>

+    <elementType

+        xsi:type="gmfgen:MetamodelType"

+        editHelperClassName="RootEditHelper"/>

+    <viewmap

+        xsi:type="gmfgen:ModeledViewmap">

+      <figureModel

+          href="phantoms.gmfgraph#phantoms"/>

+    </viewmap>

+    <domainDiagramElement

+        href="phantoms.genmodel#//phantoms/Root"/>

+    <childNodes

+        visualID="3001"

+        editPartClassName="MediumParentEditPart"

+        itemSemanticEditPolicyClassName="MediumParentItemSemanticEditPolicy"

+        canonicalEditPolicyClassName="MediumParentCanonicalEditPolicy"

+        graphicalNodeEditPolicyClassName="MediumParentGraphicalNodeEditPolicy"

+        createCommandClassName="MediumParentCreateCommand"

+        containers="//@diagram/@topLevelNodes.0">

+      <diagramRunTimeClass

+          href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>

+      <elementType

+          xsi:type="gmfgen:MetamodelType"

+          editHelperClassName="MediumParentEditHelper"/>

+      <viewmap

+          xsi:type="gmfgen:ModeledViewmap">

+        <figureModel

+            href="phantoms.gmfgraph#MediumParent"/>

+      </viewmap>

+      <modelFacet>

+        <metaClass

+            href="phantoms.genmodel#//phantoms/MediumParent"/>

+        <containmentMetaFeature

+            href="phantoms.genmodel#//phantoms/Medium/children"/>

+        <childMetaFeature

+            href="phantoms.genmodel#//phantoms/Medium/children"/>

+      </modelFacet>

+    </childNodes>

+    <childNodes

+        visualID="3002"

+        editPartClassName="MediumChildEditPart"

+        itemSemanticEditPolicyClassName="MediumChildItemSemanticEditPolicy"

+        canonicalEditPolicyClassName="MediumChildCanonicalEditPolicy"

+        graphicalNodeEditPolicyClassName="MediumChildGraphicalNodeEditPolicy"

+        createCommandClassName="MediumChildCreateCommand"

+        containers="//@diagram/@topLevelNodes.0">

+      <diagramRunTimeClass

+          href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>

+      <elementType

+          xsi:type="gmfgen:MetamodelType"

+          editHelperClassName="MediumChildEditHelper"/>

+      <viewmap

+          xsi:type="gmfgen:ModeledViewmap"

+          layoutType="FLOW_LAYOUT">

+        <figureModel

+            href="phantoms.gmfgraph#MediumChild"/>

+      </viewmap>

+      <modelFacet>

+        <metaClass

+            href="phantoms.genmodel#//phantoms/MediumChild"/>

+      </modelFacet>

+      <labels

+          visualID="5001"

+          editPartClassName="MediumChildNameEditPart"

+          itemSemanticEditPolicyClassName="MediumChildNameItemSemanticEditPolicy"

+          elementIcon="true">

+        <diagramRunTimeClass

+            href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>

+        <viewmap

+            xsi:type="gmfgen:ModeledViewmap">

+          <figureModel

+              href="phantoms.gmfgraph#MediumChildName"/>

+        </viewmap>

+        <modelFacet

+            xsi:type="gmfgen:FeatureLabelModelFacet"

+            parser="//@labelParsers/@implementations.0">

+          <metaFeatures

+              href="phantoms.genmodel#//phantoms/MediumChild/name"/>

+        </modelFacet>

+      </labels>

+    </childNodes>

+    <topLevelNodes

+        visualID="2001"

+        editPartClassName="MediumEditPart"

+        itemSemanticEditPolicyClassName="MediumItemSemanticEditPolicy"

+        canonicalEditPolicyClassName="MediumCanonicalEditPolicy"

+        childNodes="//@diagram/@childNodes.0 //@diagram/@childNodes.1"

+        graphicalNodeEditPolicyClassName="MediumGraphicalNodeEditPolicy"

+        createCommandClassName="MediumCreateCommand">

+      <diagramRunTimeClass

+          href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>

+      <elementType

+          xsi:type="gmfgen:MetamodelType"

+          editHelperClassName="MediumEditHelper"/>

+      <viewmap

+          xsi:type="gmfgen:ModeledViewmap"

+          layoutType="XY_LAYOUT">

+        <figureModel

+            href="phantoms.gmfgraph#Medium"/>

+      </viewmap>

+      <modelFacet>

+        <metaClass

+            href="phantoms.genmodel#//phantoms/Medium"/>

+        <containmentMetaFeature

+            href="phantoms.genmodel#//phantoms/Root/children"/>

+        <childMetaFeature

+            href="phantoms.genmodel#//phantoms/Root/children"/>

+      </modelFacet>

+    </topLevelNodes>

+    <topLevelNodes

+        visualID="2002"

+        editPartClassName="TopParentEditPart"

+        itemSemanticEditPolicyClassName="TopParentItemSemanticEditPolicy"

+        canonicalEditPolicyClassName="TopParentCanonicalEditPolicy"

+        graphicalNodeEditPolicyClassName="TopParentGraphicalNodeEditPolicy"

+        createCommandClassName="TopParentCreateCommand">

+      <diagramRunTimeClass

+          href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>

+      <elementType

+          xsi:type="gmfgen:MetamodelType"

+          editHelperClassName="TopParentEditHelper"/>

+      <viewmap

+          xsi:type="gmfgen:ModeledViewmap">

+        <figureModel

+            href="phantoms.gmfgraph#TopParent"/>

+      </viewmap>

+      <modelFacet>

+        <metaClass

+            href="phantoms.genmodel#//phantoms/TopParent"/>

+        <containmentMetaFeature

+            href="phantoms.genmodel#//phantoms/Root/children"/>

+        <childMetaFeature

+            href="phantoms.genmodel#//phantoms/Root/children"/>

+      </modelFacet>

+    </topLevelNodes>

+    <topLevelNodes

+        visualID="2003"

+        editPartClassName="TopChildEditPart"

+        itemSemanticEditPolicyClassName="TopChildItemSemanticEditPolicy"

+        canonicalEditPolicyClassName="TopChildCanonicalEditPolicy"

+        graphicalNodeEditPolicyClassName="TopChildGraphicalNodeEditPolicy"

+        createCommandClassName="TopChildCreateCommand">

+      <diagramRunTimeClass

+          href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>

+      <elementType

+          xsi:type="gmfgen:MetamodelType"

+          editHelperClassName="TopChildEditHelper"/>

+      <viewmap

+          xsi:type="gmfgen:ModeledViewmap"

+          layoutType="FLOW_LAYOUT">

+        <figureModel

+            href="phantoms.gmfgraph#TopChild"/>

+      </viewmap>

+      <modelFacet>

+        <metaClass

+            href="phantoms.genmodel#//phantoms/TopChild"/>

+      </modelFacet>

+      <labels

+          visualID="5002"

+          editPartClassName="TopChildNameEditPart"

+          itemSemanticEditPolicyClassName="TopChildNameItemSemanticEditPolicy"

+          elementIcon="true">

+        <diagramRunTimeClass

+            href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>

+        <viewmap

+            xsi:type="gmfgen:ModeledViewmap">

+          <figureModel

+              href="phantoms.gmfgraph#TopChildName"/>

+        </viewmap>

+        <modelFacet

+            xsi:type="gmfgen:FeatureLabelModelFacet"

+            parser="//@labelParsers/@implementations.0">

+          <metaFeatures

+              href="phantoms.genmodel#//phantoms/TopChild/name"/>

+        </modelFacet>

+      </labels>

+    </topLevelNodes>

+    <links

+        visualID="4001"

+        editPartClassName="TopParentChildrenEditPart"

+        itemSemanticEditPolicyClassName="TopParentChildrenItemSemanticEditPolicy"

+        createCommandClassName="TopParentChildrenCreateCommand"

+        reorientCommandClassName="TopParentChildrenReorientCommand">

+      <diagramRunTimeClass

+          href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>

+      <elementType

+          xsi:type="gmfgen:SpecializationType"/>

+      <viewmap

+          xsi:type="gmfgen:ModeledViewmap">

+        <figureModel

+            href="phantoms.gmfgraph#TopParentChildren"/>

+      </viewmap>

+      <modelFacet

+          xsi:type="gmfgen:FeatureLinkModelFacet">

+        <metaFeature

+            href="phantoms.genmodel#//phantoms/TopParent/children"/>

+      </modelFacet>

+    </links>

+    <links

+        visualID="4002"

+        editPartClassName="MediumParentChildrenEditPart"

+        itemSemanticEditPolicyClassName="MediumParentChildrenItemSemanticEditPolicy"

+        createCommandClassName="MediumParentChildrenCreateCommand"

+        reorientCommandClassName="MediumParentChildrenReorientCommand">

+      <diagramRunTimeClass

+          href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>

+      <elementType

+          xsi:type="gmfgen:SpecializationType"/>

+      <viewmap

+          xsi:type="gmfgen:ModeledViewmap">

+        <figureModel

+            href="phantoms.gmfgraph#MediumParentChildren"/>

+      </viewmap>

+      <modelFacet

+          xsi:type="gmfgen:FeatureLinkModelFacet">

+        <metaFeature

+            href="phantoms.genmodel#//phantoms/MediumParent/children"/>

+      </modelFacet>

+    </links>

+    <palette>

+      <groups

+          title="Nodes"

+          collapse="true">

+        <entries

+            xsi:type="gmfgen:ToolEntry"

+            title="TopParent"

+            description="Create new TopParent"

+            genNodes="//@diagram/@topLevelNodes.1"/>

+        <entries

+            xsi:type="gmfgen:ToolEntry"

+            title="Medium"

+            description="Create new Medium"

+            genNodes="//@diagram/@topLevelNodes.0"/>

+        <entries

+            xsi:type="gmfgen:ToolEntry"

+            title="MediumParent"

+            description="Create new MediumParent"

+            genNodes="//@diagram/@childNodes.0"/>

+      </groups>

+      <groups

+          title="Phantoms"

+          collapse="true">

+        <entries

+            xsi:type="gmfgen:ToolEntry"

+            title="TopChild"

+            description="Create new TopChild"

+            genNodes="//@diagram/@topLevelNodes.2"/>

+        <entries

+            xsi:type="gmfgen:ToolEntry"

+            title="MediumChild"

+            description="Create new MediumChild"

+            genNodes="//@diagram/@childNodes.1"/>

+      </groups>

+      <groups

+          title="Links"

+          collapse="true">

+        <entries

+            xsi:type="gmfgen:ToolEntry"

+            title="MediumParentChildren"

+            description="Create new MediumParentChildren"

+            genLinks="//@diagram/@links.1"/>

+        <entries

+            xsi:type="gmfgen:ToolEntry"

+            title="TopParentChildren"

+            description="Create new TopParentChildren"

+            genLinks="//@diagram/@links.0"/>

+      </groups>

+    </palette>

+    <preferencePages

+        xsi:type="gmfgen:GenStandardPreferencePage"

+        iD="org.eclipse.gmf.tooling.examples.phantoms.diagram.general"

+        name="Phantoms Diagram">

+      <children

+          xsi:type="gmfgen:GenStandardPreferencePage"

+          iD="org.eclipse.gmf.tooling.examples.phantoms.diagram.appearance"

+          name="Appearance"

+          kind="Appearance"/>

+      <children

+          xsi:type="gmfgen:GenStandardPreferencePage"

+          iD="org.eclipse.gmf.tooling.examples.phantoms.diagram.connections"

+          name="Connections"

+          kind="Connections"/>

+      <children

+          xsi:type="gmfgen:GenStandardPreferencePage"

+          iD="org.eclipse.gmf.tooling.examples.phantoms.diagram.printing"

+          name="Printing"

+          kind="Printing"/>

+      <children

+          xsi:type="gmfgen:GenStandardPreferencePage"

+          iD="org.eclipse.gmf.tooling.examples.phantoms.diagram.rulersAndGrid"

+          name="Rulers And Grid"

+          kind="RulersAndGrid"/>

+    </preferencePages>

+  </diagram>

+  <plugin>

+    <requiredPlugins>org.eclipse.gmf.tooling.runtime</requiredPlugins>

+  </plugin>

+  <editor/>

+  <navigator>

+    <childReferences

+        child="//@diagram"/>

+    <childReferences

+        parent="//@diagram/@topLevelNodes.0"

+        child="//@diagram/@childNodes.0"/>

+    <childReferences

+        parent="//@diagram/@topLevelNodes.0"

+        child="//@diagram/@childNodes.1"/>

+    <childReferences

+        parent="//@diagram"

+        child="//@diagram/@topLevelNodes.0"/>

+    <childReferences

+        parent="//@diagram"

+        child="//@diagram/@topLevelNodes.1"/>

+    <childReferences

+        parent="//@diagram"

+        child="//@diagram/@topLevelNodes.2"/>

+    <childReferences

+        parent="//@diagram"

+        child="//@diagram/@links.0"

+        groupName="links"

+        groupIcon="icons/linksNavigatorGroup.gif"/>

+    <childReferences

+        parent="//@diagram/@links.0"

+        child="//@diagram/@topLevelNodes.2"

+        referenceType="out_target"

+        groupName="target"

+        groupIcon="icons/linkTargetNavigatorGroup.gif"/>

+    <childReferences

+        parent="//@diagram/@topLevelNodes.2"

+        child="//@diagram/@links.0"

+        referenceType="in_source"

+        groupName="incoming links"

+        groupIcon="icons/incomingLinksNavigatorGroup.gif"/>

+    <childReferences

+        parent="//@diagram/@links.0"

+        child="//@diagram/@topLevelNodes.1"

+        referenceType="in_source"

+        groupName="source"

+        groupIcon="icons/linkSourceNavigatorGroup.gif"/>

+    <childReferences

+        parent="//@diagram/@topLevelNodes.1"

+        child="//@diagram/@links.0"

+        referenceType="out_target"

+        groupName="outgoing links"

+        groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>

+    <childReferences

+        parent="//@diagram"

+        child="//@diagram/@links.1"

+        groupName="links"

+        groupIcon="icons/linksNavigatorGroup.gif"/>

+    <childReferences

+        parent="//@diagram/@links.1"

+        child="//@diagram/@childNodes.1"

+        referenceType="out_target"

+        groupName="target"

+        groupIcon="icons/linkTargetNavigatorGroup.gif"/>

+    <childReferences

+        parent="//@diagram/@childNodes.1"

+        child="//@diagram/@links.1"

+        referenceType="in_source"

+        groupName="incoming links"

+        groupIcon="icons/incomingLinksNavigatorGroup.gif"/>

+    <childReferences

+        parent="//@diagram/@links.1"

+        child="//@diagram/@childNodes.0"

+        referenceType="in_source"

+        groupName="source"

+        groupIcon="icons/linkSourceNavigatorGroup.gif"/>

+    <childReferences

+        parent="//@diagram/@childNodes.0"

+        child="//@diagram/@links.1"

+        referenceType="out_target"

+        groupName="outgoing links"

+        groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>

+  </navigator>

+  <diagramUpdater/>

+  <propertySheet>

+    <tabs

+        xsi:type="gmfgen:GenStandardPropertyTab"

+        iD="appearance"/>

+    <tabs

+        xsi:type="gmfgen:GenStandardPropertyTab"

+        iD="diagram"/>

+    <tabs

+        xsi:type="gmfgen:GenCustomPropertyTab"

+        iD="domain"

+        label="Core">

+      <filter

+          xsi:type="gmfgen:TypeTabFilter">

+        <types>org.eclipse.gmf.runtime.notation.View</types>

+        <types>org.eclipse.gef.EditPart</types>

+        <generatedTypes>abstractNavigatorItem</generatedTypes>

+      </filter>

+    </tabs>

+  </propertySheet>

+  <domainGenModel

+      href="phantoms.genmodel#/"/>

+  <labelParsers

+      extensibleViaService="true">

+    <implementations

+        xsi:type="gmfgen:PredefinedParser"

+        uses="//@diagram/@childNodes.1/@labels.0/@modelFacet //@diagram/@topLevelNodes.2/@labels.0/@modelFacet"/>

+  </labelParsers>

+  <contextMenus

+      context="//@diagram">

+    <items

+        xsi:type="gmfgen:LoadResourceAction"/>

+  </contextMenus>

+</gmfgen:GenEditorGenerator>

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.gmfgraph b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.gmfgraph
new file mode 100755
index 0000000..9e3fea9
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.gmfgraph
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<gmfgraph:Canvas xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gmfgraph="http://www.eclipse.org/gmf/2006/GraphicalDefinition" name="phantoms">

+  <figures name="Default">

+    <figures xsi:type="gmfgraph:PolylineDecoration" name="TopParentChildrenTargetDecoration"/>

+    <figures xsi:type="gmfgraph:PolylineDecoration" name="MediumParentChildrenTargetDecoration"/>

+    <descriptors name="TopParentFigure">

+      <actualFigure xsi:type="gmfgraph:Ellipse"/>

+    </descriptors>

+    <descriptors name="TopParentChildrenFigure">

+      <actualFigure xsi:type="gmfgraph:PolylineConnection" name="TopParentChildrenFigure" targetDecoration="//@figures.0/@figures.0"/>

+    </descriptors>

+    <descriptors name="MediumFigure">

+      <actualFigure xsi:type="gmfgraph:RoundedRectangle">

+        <layout xsi:type="gmfgraph:XYLayout"/>

+      </actualFigure>

+    </descriptors>

+    <descriptors name="TopChildFigure">

+      <actualFigure xsi:type="gmfgraph:Rectangle" name="TopChildFigure">

+        <layout xsi:type="gmfgraph:FlowLayout"/>

+        <children xsi:type="gmfgraph:Label" name="TopChildNameFigure" text="&lt;...>"/>

+      </actualFigure>

+      <accessors figure="//@figures.0/@descriptors.3/@actualFigure/@children.0"/>

+    </descriptors>

+    <descriptors name="MediumParentFigure">

+      <actualFigure xsi:type="gmfgraph:Ellipse"/>

+    </descriptors>

+    <descriptors name="MediumParentChildrenFigure">

+      <actualFigure xsi:type="gmfgraph:PolylineConnection" name="MediumParentChildrenFigure" targetDecoration="//@figures.0/@figures.1"/>

+    </descriptors>

+    <descriptors name="MediumChildFigure">

+      <actualFigure xsi:type="gmfgraph:Rectangle" name="MediumChildFigure">

+        <layout xsi:type="gmfgraph:FlowLayout"/>

+        <children xsi:type="gmfgraph:Label" name="MediumChildNameFigure" text="&lt;...>"/>

+      </actualFigure>

+      <accessors figure="//@figures.0/@descriptors.6/@actualFigure/@children.0"/>

+    </descriptors>

+  </figures>

+  <nodes name="TopParent" figure="TopParentFigure"/>

+  <nodes name="Medium" figure="MediumFigure"/>

+  <nodes name="TopChild" figure="TopChildFigure"/>

+  <nodes name="MediumParent" figure="MediumParentFigure"/>

+  <nodes name="MediumChild" figure="MediumChildFigure"/>

+  <connections name="TopParentChildren" figure="TopParentChildrenFigure"/>

+  <connections name="MediumParentChildren" figure="MediumParentChildrenFigure"/>

+  <labels name="TopChildName" figure="TopChildFigure" accessor="//@figures.0/@descriptors.3/@accessors.0"/>

+  <labels name="MediumChildName" figure="MediumChildFigure" accessor="//@figures.0/@descriptors.6/@accessors.0"/>

+</gmfgraph:Canvas>

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.gmfmap b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.gmfmap
new file mode 100755
index 0000000..23b049e
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.gmfmap
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<gmfmap:Mapping

+    xmi:version="2.0"

+    xmlns:xmi="http://www.omg.org/XMI"

+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

+    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"

+    xmlns:gmfmap="http://www.eclipse.org/gmf/2008/mappings"

+    xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">

+  <nodes>

+    <containmentFeature

+        href="phantoms.ecore#//Root/children"/>

+    <ownedChild>

+      <domainMetaElement

+          href="phantoms.ecore#//Medium"/>

+      <tool

+          xsi:type="gmftool:CreationTool"

+          href="phantoms.gmftool#//@palette/@tools.0/@tools.1"/>

+      <diagramNode

+          href="phantoms.gmfgraph#Medium"/>

+      <children>

+        <containmentFeature

+            href="phantoms.ecore#//Medium/children"/>

+        <ownedChild>

+          <domainMetaElement

+              href="phantoms.ecore#//MediumParent"/>

+          <tool

+              xsi:type="gmftool:CreationTool"

+              href="phantoms.gmftool#//@palette/@tools.0/@tools.2"/>

+          <diagramNode

+              href="phantoms.gmfgraph#MediumParent"/>

+        </ownedChild>

+      </children>

+      <children>

+        <ownedChild>

+          <domainMetaElement

+              href="phantoms.ecore#//MediumChild"/>

+          <labelMappings

+              xsi:type="gmfmap:FeatureLabelMapping">

+            <diagramLabel

+                href="phantoms.gmfgraph#MediumChildName"/>

+            <features

+                href="phantoms.ecore#//MediumChild/name"/>

+          </labelMappings>

+          <tool

+              xsi:type="gmftool:CreationTool"

+              href="phantoms.gmftool#//@palette/@tools.1/@tools.1"/>

+          <diagramNode

+              href="phantoms.gmfgraph#MediumChild"/>

+        </ownedChild>

+      </children>

+    </ownedChild>

+  </nodes>

+  <nodes>

+    <containmentFeature

+        href="phantoms.ecore#//Root/children"/>

+    <ownedChild>

+      <domainMetaElement

+          href="phantoms.ecore#//TopParent"/>

+      <tool

+          xsi:type="gmftool:CreationTool"

+          href="phantoms.gmftool#//@palette/@tools.0/@tools.0"/>

+      <diagramNode

+          href="phantoms.gmfgraph#TopParent"/>

+    </ownedChild>

+  </nodes>

+  <nodes>

+    <ownedChild>

+      <domainMetaElement

+          href="phantoms.ecore#//TopChild"/>

+      <labelMappings

+          xsi:type="gmfmap:FeatureLabelMapping">

+        <diagramLabel

+            href="phantoms.gmfgraph#TopChildName"/>

+        <features

+            href="phantoms.ecore#//TopChild/name"/>

+      </labelMappings>

+      <tool

+          xsi:type="gmftool:CreationTool"

+          href="phantoms.gmftool#//@palette/@tools.1/@tools.0"/>

+      <diagramNode

+          href="phantoms.gmfgraph#TopChild"/>

+    </ownedChild>

+  </nodes>

+  <links>

+    <tool

+        xsi:type="gmftool:CreationTool"

+        href="phantoms.gmftool#//@palette/@tools.2/@tools.1"/>

+    <diagramLink

+        href="phantoms.gmfgraph#TopParentChildren"/>

+    <linkMetaFeature

+        xsi:type="ecore:EReference"

+        href="phantoms.ecore#//TopParent/children"/>

+  </links>

+  <links>

+    <tool

+        xsi:type="gmftool:CreationTool"

+        href="phantoms.gmftool#//@palette/@tools.2/@tools.0"/>

+    <diagramLink

+        href="phantoms.gmfgraph#MediumParentChildren"/>

+    <linkMetaFeature

+        xsi:type="ecore:EReference"

+        href="phantoms.ecore#//MediumParent/children"/>

+  </links>

+  <diagram>

+    <diagramCanvas

+        href="phantoms.gmfgraph#phantoms"/>

+    <domainModel

+        href="phantoms.ecore#/"/>

+    <domainMetaElement

+        href="phantoms.ecore#//Root"/>

+    <palette

+        href="phantoms.gmftool#//@palette"/>

+  </diagram>

+</gmfmap:Mapping>

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.gmftool b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.gmftool
new file mode 100755
index 0000000..c530a04
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.gmftool
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<gmftool:ToolRegistry

+    xmi:version="2.0"

+    xmlns:xmi="http://www.omg.org/XMI"

+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

+    xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">

+  <palette

+      title="phantomsPalette">

+    <tools

+        xsi:type="gmftool:ToolGroup"

+        title="Nodes"

+        collapsible="true">

+      <tools

+          xsi:type="gmftool:CreationTool"

+          title="TopParent"

+          description="Create new TopParent">

+        <smallIcon

+            xsi:type="gmftool:DefaultImage"/>

+        <largeIcon

+            xsi:type="gmftool:DefaultImage"/>

+      </tools>

+      <tools

+          xsi:type="gmftool:CreationTool"

+          title="Medium"

+          description="Create new Medium">

+        <smallIcon

+            xsi:type="gmftool:DefaultImage"/>

+        <largeIcon

+            xsi:type="gmftool:DefaultImage"/>

+      </tools>

+      <tools

+          xsi:type="gmftool:CreationTool"

+          title="MediumParent"

+          description="Create new MediumParent">

+        <smallIcon

+            xsi:type="gmftool:DefaultImage"/>

+        <largeIcon

+            xsi:type="gmftool:DefaultImage"/>

+      </tools>

+    </tools>

+    <tools

+        xsi:type="gmftool:ToolGroup"

+        title="Phantoms"

+        collapsible="true">

+      <tools

+          xsi:type="gmftool:CreationTool"

+          title="TopChild"

+          description="Create new TopChild">

+        <smallIcon

+            xsi:type="gmftool:DefaultImage"/>

+        <largeIcon

+            xsi:type="gmftool:DefaultImage"/>

+      </tools>

+      <tools

+          xsi:type="gmftool:CreationTool"

+          title="MediumChild"

+          description="Create new MediumChild">

+        <smallIcon

+            xsi:type="gmftool:DefaultImage"/>

+        <largeIcon

+            xsi:type="gmftool:DefaultImage"/>

+      </tools>

+    </tools>

+    <tools

+        xsi:type="gmftool:ToolGroup"

+        title="Links"

+        collapsible="true">

+      <tools

+          xsi:type="gmftool:CreationTool"

+          title="MediumParentChildren"

+          description="Create new MediumParentChildren">

+        <smallIcon

+            xsi:type="gmftool:DefaultImage"/>

+        <largeIcon

+            xsi:type="gmftool:DefaultImage"/>

+      </tools>

+      <tools

+          xsi:type="gmftool:CreationTool"

+          title="TopParentChildren"

+          description="Create new TopParentChildren">

+        <smallIcon

+            xsi:type="gmftool:DefaultImage"/>

+        <largeIcon

+            xsi:type="gmftool:DefaultImage"/>

+      </tools>

+    </tools>

+  </palette>

+</gmftool:ToolRegistry>

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.trace b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.trace
new file mode 100755
index 0000000..d0178c6
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.trace
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<trace:TraceModel

+    xmi:version="2.0"

+    xmlns:xmi="http://www.omg.org/XMI"

+    xmlns:trace="http://www.eclipse.org/gmf/2006/Trace">

+  <nodeTraces

+      visualID="2001"

+      queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://org.eclipse.gmf.tooling.examples.phantoms' and _eClass_.name = 'Medium') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://org.eclipse.gmf.tooling.examples.phantoms' and _eClass_.name = 'Root') and _containmentMF_.name = 'children')"/>

+  <nodeTraces

+      visualID="2002"

+      queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://org.eclipse.gmf.tooling.examples.phantoms' and _eClass_.name = 'TopParent') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://org.eclipse.gmf.tooling.examples.phantoms' and _eClass_.name = 'Root') and _containmentMF_.name = 'children')"/>

+  <nodeTraces

+      visualID="2003"

+      queryText="let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://org.eclipse.gmf.tooling.examples.phantoms' and _eClass_.name = 'TopChild'">

+    <nodeLabelTraces

+        visualID="5002"

+        queryText="true"/>

+  </nodeTraces>

+  <childNodeTraces

+      visualID="3001"

+      queryText="(let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://org.eclipse.gmf.tooling.examples.phantoms' and _eClass_.name = 'MediumParent') and (let _containmentMF_:ecore::EStructuralFeature = modelFacet.containmentMetaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _containmentMF_.eContainingClass in _eClass_.ePackage.nsURI = 'http://org.eclipse.gmf.tooling.examples.phantoms' and _eClass_.name = 'Medium') and _containmentMF_.name = 'children')"/>

+  <childNodeTraces

+      visualID="3002"

+      queryText="let _eClass_:ecore::EClass = modelFacet.metaClass.ecoreClass in _eClass_.ePackage.nsURI = 'http://org.eclipse.gmf.tooling.examples.phantoms' and _eClass_.name = 'MediumChild'">

+    <nodeLabelTraces

+        visualID="5001"

+        queryText="true"/>

+  </childNodeTraces>

+  <linkTraces

+      visualID="4001"

+      queryText="modelFacet.oclIsKindOf(gmfgen::FeatureLinkModelFacet) and (let _feature_:ecore::EStructuralFeature = modelFacet.oclAsType(gmfgen::FeatureLinkModelFacet).metaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _feature_.eContainingClass in _eClass_.ePackage.nsURI = 'http://org.eclipse.gmf.tooling.examples.phantoms' and _eClass_.name = 'TopParent') and _feature_.name = 'children')"/>

+  <linkTraces

+      visualID="4002"

+      queryText="modelFacet.oclIsKindOf(gmfgen::FeatureLinkModelFacet) and (let _feature_:ecore::EStructuralFeature = modelFacet.oclAsType(gmfgen::FeatureLinkModelFacet).metaFeature.ecoreFeature in (let _eClass_:ecore::EClass = _feature_.eContainingClass in _eClass_.ePackage.nsURI = 'http://org.eclipse.gmf.tooling.examples.phantoms' and _eClass_.name = 'MediumParent') and _feature_.name = 'children')"/>

+</trace:TraceModel>

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/plugin.properties b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/plugin.properties
new file mode 100755
index 0000000..7127140
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/plugin.properties
@@ -0,0 +1,2 @@
+pluginName = Phantoms Test Sample Model

+providerName = Eclipse Modeling Project

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/plugin.xml b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/plugin.xml
new file mode 100755
index 0000000..75cbfec
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/plugin.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<?eclipse version="3.0"?>

+

+<!--

+-->

+

+<plugin>

+

+   <extension point="org.eclipse.emf.ecore.generated_package">

+      <!-- @generated phantoms -->

+      <package

+            uri="http://org.eclipse.gmf.tooling.examples.phantoms"

+            class="org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage"

+            genModel="model/phantoms.genmodel"/>

+   </extension>

+

+</plugin>

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/pom.xml b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/pom.xml
new file mode 100755
index 0000000..fdece57
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/pom.xml
@@ -0,0 +1,23 @@
+<!--
+ * Copyright (c) 2013 Montages AG
+ *  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
+ *  
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.eclipse.gmf-tooling</groupId>
+  <artifactId>org.eclipse.gmf.tooling.examples.phantoms</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>eclipse-plugin</packaging>
+  
+  <parent>
+  	<groupId>org.eclipse.gmf-tooling</groupId>
+	<artifactId>phantoms-example</artifactId>
+	<version>1.0.0-SNAPSHOT</version>
+	<relativePath>../</relativePath>
+  </parent>
+  
+</project>
diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/Medium.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/Medium.java
new file mode 100755
index 0000000..9ab5f43
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/Medium.java
@@ -0,0 +1,40 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms;

+

+import org.eclipse.emf.common.util.EList;

+

+/**

+ * <!-- begin-user-doc -->

+ * A representation of the model object '<em><b>Medium</b></em>'.

+ * <!-- end-user-doc -->

+ *

+ * <p>

+ * The following features are supported:

+ * <ul>

+ *   <li>{@link org.eclipse.gmf.tooling.examples.phantoms.Medium#getChildren <em>Children</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage#getMedium()

+ * @model

+ * @generated

+ */

+public interface Medium extends RootChild {

+	/**

+	 * Returns the value of the '<em><b>Children</b></em>' containment reference list.

+	 * The list contents are of type {@link org.eclipse.gmf.tooling.examples.phantoms.MediumParent}.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Children</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>Children</em>' containment reference list.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage#getMedium_Children()

+	 * @model containment="true"

+	 * @generated

+	 */

+	EList<MediumParent> getChildren();

+

+} // Medium

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/MediumChild.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/MediumChild.java
new file mode 100755
index 0000000..42433c5
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/MediumChild.java
@@ -0,0 +1,51 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms;

+

+import org.eclipse.emf.ecore.EObject;

+

+/**

+ * <!-- begin-user-doc -->

+ * A representation of the model object '<em><b>Medium Child</b></em>'.

+ * <!-- end-user-doc -->

+ *

+ * <p>

+ * The following features are supported:

+ * <ul>

+ *   <li>{@link org.eclipse.gmf.tooling.examples.phantoms.MediumChild#getName <em>Name</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage#getMediumChild()

+ * @model

+ * @generated

+ */

+public interface MediumChild extends EObject {

+	/**

+	 * Returns the value of the '<em><b>Name</b></em>' attribute.

+	 * The default value is <code>"MediumChild"</code>.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,

+	 * there really should be more of a description here...

+	 * </p>

+	 * <!-- end-user-doc -->

+	 * @return the value of the '<em>Name</em>' attribute.

+	 * @see #setName(String)

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage#getMediumChild_Name()

+	 * @model default="MediumChild"

+	 * @generated

+	 */

+	String getName();

+

+	/**

+	 * Sets the value of the '{@link org.eclipse.gmf.tooling.examples.phantoms.MediumChild#getName <em>Name</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @param value the new value of the '<em>Name</em>' attribute.

+	 * @see #getName()

+	 * @generated

+	 */

+	void setName(String value);

+

+} // MediumChild

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/MediumParent.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/MediumParent.java
new file mode 100755
index 0000000..73a81cf
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/MediumParent.java
@@ -0,0 +1,42 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms;

+

+import org.eclipse.emf.common.util.EList;

+

+import org.eclipse.emf.ecore.EObject;

+

+/**

+ * <!-- begin-user-doc -->

+ * A representation of the model object '<em><b>Medium Parent</b></em>'.

+ * <!-- end-user-doc -->

+ *

+ * <p>

+ * The following features are supported:

+ * <ul>

+ *   <li>{@link org.eclipse.gmf.tooling.examples.phantoms.MediumParent#getChildren <em>Children</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage#getMediumParent()

+ * @model

+ * @generated

+ */

+public interface MediumParent extends EObject {

+	/**

+	 * Returns the value of the '<em><b>Children</b></em>' containment reference list.

+	 * The list contents are of type {@link org.eclipse.gmf.tooling.examples.phantoms.MediumChild}.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Children</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>Children</em>' containment reference list.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage#getMediumParent_Children()

+	 * @model containment="true"

+	 * @generated

+	 */

+	EList<MediumChild> getChildren();

+

+} // MediumParent

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/PhantomsFactory.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/PhantomsFactory.java
new file mode 100755
index 0000000..d593fa3
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/PhantomsFactory.java
@@ -0,0 +1,96 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms;

+

+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.tooling.examples.phantoms.PhantomsPackage

+ * @generated

+ */

+public interface PhantomsFactory extends EFactory {

+	/**

+	 * The singleton instance of the factory.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	PhantomsFactory eINSTANCE = org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsFactoryImpl.init();

+

+	/**

+	 * Returns a new object of class '<em>Root</em>'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return a new object of class '<em>Root</em>'.

+	 * @generated

+	 */

+	Root createRoot();

+

+	/**

+	 * Returns a new object of class '<em>Root Child</em>'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return a new object of class '<em>Root Child</em>'.

+	 * @generated

+	 */

+	RootChild createRootChild();

+

+	/**

+	 * Returns a new object of class '<em>Top Parent</em>'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return a new object of class '<em>Top Parent</em>'.

+	 * @generated

+	 */

+	TopParent createTopParent();

+

+	/**

+	 * Returns a new object of class '<em>Medium</em>'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return a new object of class '<em>Medium</em>'.

+	 * @generated

+	 */

+	Medium createMedium();

+

+	/**

+	 * Returns a new object of class '<em>Top Child</em>'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return a new object of class '<em>Top Child</em>'.

+	 * @generated

+	 */

+	TopChild createTopChild();

+

+	/**

+	 * Returns a new object of class '<em>Medium Parent</em>'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return a new object of class '<em>Medium Parent</em>'.

+	 * @generated

+	 */

+	MediumParent createMediumParent();

+

+	/**

+	 * Returns a new object of class '<em>Medium Child</em>'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return a new object of class '<em>Medium Child</em>'.

+	 * @generated

+	 */

+	MediumChild createMediumChild();

+

+	/**

+	 * Returns the package supported by this factory.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the package supported by this factory.

+	 * @generated

+	 */

+	PhantomsPackage getPhantomsPackage();

+

+} //PhantomsFactory

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/PhantomsPackage.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/PhantomsPackage.java
new file mode 100755
index 0000000..ddbda0d
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/PhantomsPackage.java
@@ -0,0 +1,589 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms;

+

+import org.eclipse.emf.ecore.EAttribute;

+import org.eclipse.emf.ecore.EClass;

+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 operation of each class,</li>

+ *   <li>each enum,</li>

+ *   <li>and each data type</li>

+ * </ul>

+ * <!-- end-user-doc -->

+ * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsFactory

+ * @model kind="package"

+ * @generated

+ */

+public interface PhantomsPackage extends EPackage {

+	/**

+	 * The package name.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	String eNAME = "phantoms";

+

+	/**

+	 * The package namespace URI.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	String eNS_URI = "http://org.eclipse.gmf.tooling.examples.phantoms";

+

+	/**

+	 * The package namespace name.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	String eNS_PREFIX = "phantoms";

+

+	/**

+	 * The singleton instance of the package.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	PhantomsPackage eINSTANCE = org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl.init();

+

+	/**

+	 * The meta object id for the '{@link org.eclipse.gmf.tooling.examples.phantoms.impl.RootImpl <em>Root</em>}' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.RootImpl

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl#getRoot()

+	 * @generated

+	 */

+	int ROOT = 0;

+

+	/**

+	 * The feature id for the '<em><b>Children</b></em>' containment reference list.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int ROOT__CHILDREN = 0;

+

+	/**

+	 * The number of structural features of the '<em>Root</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int ROOT_FEATURE_COUNT = 1;

+

+	/**

+	 * The number of operations of the '<em>Root</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int ROOT_OPERATION_COUNT = 0;

+

+	/**

+	 * The meta object id for the '{@link org.eclipse.gmf.tooling.examples.phantoms.impl.RootChildImpl <em>Root Child</em>}' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.RootChildImpl

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl#getRootChild()

+	 * @generated

+	 */

+	int ROOT_CHILD = 1;

+

+	/**

+	 * The number of structural features of the '<em>Root Child</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int ROOT_CHILD_FEATURE_COUNT = 0;

+

+	/**

+	 * The number of operations of the '<em>Root Child</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int ROOT_CHILD_OPERATION_COUNT = 0;

+

+	/**

+	 * The meta object id for the '{@link org.eclipse.gmf.tooling.examples.phantoms.impl.TopParentImpl <em>Top Parent</em>}' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.TopParentImpl

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl#getTopParent()

+	 * @generated

+	 */

+	int TOP_PARENT = 2;

+

+	/**

+	 * The feature id for the '<em><b>Children</b></em>' containment reference list.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int TOP_PARENT__CHILDREN = ROOT_CHILD_FEATURE_COUNT + 0;

+

+	/**

+	 * The number of structural features of the '<em>Top Parent</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int TOP_PARENT_FEATURE_COUNT = ROOT_CHILD_FEATURE_COUNT + 1;

+

+	/**

+	 * The number of operations of the '<em>Top Parent</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int TOP_PARENT_OPERATION_COUNT = ROOT_CHILD_OPERATION_COUNT + 0;

+

+	/**

+	 * The meta object id for the '{@link org.eclipse.gmf.tooling.examples.phantoms.impl.MediumImpl <em>Medium</em>}' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.MediumImpl

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl#getMedium()

+	 * @generated

+	 */

+	int MEDIUM = 3;

+

+	/**

+	 * The feature id for the '<em><b>Children</b></em>' containment reference list.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int MEDIUM__CHILDREN = ROOT_CHILD_FEATURE_COUNT + 0;

+

+	/**

+	 * The number of structural features of the '<em>Medium</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int MEDIUM_FEATURE_COUNT = ROOT_CHILD_FEATURE_COUNT + 1;

+

+	/**

+	 * The number of operations of the '<em>Medium</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int MEDIUM_OPERATION_COUNT = ROOT_CHILD_OPERATION_COUNT + 0;

+

+	/**

+	 * The meta object id for the '{@link org.eclipse.gmf.tooling.examples.phantoms.impl.TopChildImpl <em>Top Child</em>}' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.TopChildImpl

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl#getTopChild()

+	 * @generated

+	 */

+	int TOP_CHILD = 4;

+

+	/**

+	 * The feature id for the '<em><b>Name</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int TOP_CHILD__NAME = 0;

+

+	/**

+	 * The number of structural features of the '<em>Top Child</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int TOP_CHILD_FEATURE_COUNT = 1;

+

+	/**

+	 * The number of operations of the '<em>Top Child</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int TOP_CHILD_OPERATION_COUNT = 0;

+

+	/**

+	 * The meta object id for the '{@link org.eclipse.gmf.tooling.examples.phantoms.impl.MediumParentImpl <em>Medium Parent</em>}' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.MediumParentImpl

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl#getMediumParent()

+	 * @generated

+	 */

+	int MEDIUM_PARENT = 5;

+

+	/**

+	 * The feature id for the '<em><b>Children</b></em>' containment reference list.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int MEDIUM_PARENT__CHILDREN = 0;

+

+	/**

+	 * The number of structural features of the '<em>Medium Parent</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int MEDIUM_PARENT_FEATURE_COUNT = 1;

+

+	/**

+	 * The number of operations of the '<em>Medium Parent</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int MEDIUM_PARENT_OPERATION_COUNT = 0;

+

+	/**

+	 * The meta object id for the '{@link org.eclipse.gmf.tooling.examples.phantoms.impl.MediumChildImpl <em>Medium Child</em>}' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.MediumChildImpl

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl#getMediumChild()

+	 * @generated

+	 */

+	int MEDIUM_CHILD = 6;

+

+	/**

+	 * The feature id for the '<em><b>Name</b></em>' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int MEDIUM_CHILD__NAME = 0;

+

+	/**

+	 * The number of structural features of the '<em>Medium Child</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int MEDIUM_CHILD_FEATURE_COUNT = 1;

+

+	/**

+	 * The number of operations of the '<em>Medium Child</em>' class.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 * @ordered

+	 */

+	int MEDIUM_CHILD_OPERATION_COUNT = 0;

+

+

+	/**

+	 * Returns the meta object for class '{@link org.eclipse.gmf.tooling.examples.phantoms.Root <em>Root</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for class '<em>Root</em>'.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.Root

+	 * @generated

+	 */

+	EClass getRoot();

+

+	/**

+	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.tooling.examples.phantoms.Root#getChildren <em>Children</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the containment reference list '<em>Children</em>'.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.Root#getChildren()

+	 * @see #getRoot()

+	 * @generated

+	 */

+	EReference getRoot_Children();

+

+	/**

+	 * Returns the meta object for class '{@link org.eclipse.gmf.tooling.examples.phantoms.RootChild <em>Root Child</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for class '<em>Root Child</em>'.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.RootChild

+	 * @generated

+	 */

+	EClass getRootChild();

+

+	/**

+	 * Returns the meta object for class '{@link org.eclipse.gmf.tooling.examples.phantoms.TopParent <em>Top Parent</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for class '<em>Top Parent</em>'.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.TopParent

+	 * @generated

+	 */

+	EClass getTopParent();

+

+	/**

+	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.tooling.examples.phantoms.TopParent#getChildren <em>Children</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the containment reference list '<em>Children</em>'.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.TopParent#getChildren()

+	 * @see #getTopParent()

+	 * @generated

+	 */

+	EReference getTopParent_Children();

+

+	/**

+	 * Returns the meta object for class '{@link org.eclipse.gmf.tooling.examples.phantoms.Medium <em>Medium</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for class '<em>Medium</em>'.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.Medium

+	 * @generated

+	 */

+	EClass getMedium();

+

+	/**

+	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.tooling.examples.phantoms.Medium#getChildren <em>Children</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the containment reference list '<em>Children</em>'.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.Medium#getChildren()

+	 * @see #getMedium()

+	 * @generated

+	 */

+	EReference getMedium_Children();

+

+	/**

+	 * Returns the meta object for class '{@link org.eclipse.gmf.tooling.examples.phantoms.TopChild <em>Top Child</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for class '<em>Top Child</em>'.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.TopChild

+	 * @generated

+	 */

+	EClass getTopChild();

+

+	/**

+	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.tooling.examples.phantoms.TopChild#getName <em>Name</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the attribute '<em>Name</em>'.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.TopChild#getName()

+	 * @see #getTopChild()

+	 * @generated

+	 */

+	EAttribute getTopChild_Name();

+

+	/**

+	 * Returns the meta object for class '{@link org.eclipse.gmf.tooling.examples.phantoms.MediumParent <em>Medium Parent</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for class '<em>Medium Parent</em>'.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.MediumParent

+	 * @generated

+	 */

+	EClass getMediumParent();

+

+	/**

+	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.tooling.examples.phantoms.MediumParent#getChildren <em>Children</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the containment reference list '<em>Children</em>'.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.MediumParent#getChildren()

+	 * @see #getMediumParent()

+	 * @generated

+	 */

+	EReference getMediumParent_Children();

+

+	/**

+	 * Returns the meta object for class '{@link org.eclipse.gmf.tooling.examples.phantoms.MediumChild <em>Medium Child</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for class '<em>Medium Child</em>'.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.MediumChild

+	 * @generated

+	 */

+	EClass getMediumChild();

+

+	/**

+	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.tooling.examples.phantoms.MediumChild#getName <em>Name</em>}'.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the meta object for the attribute '<em>Name</em>'.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.MediumChild#getName()

+	 * @see #getMediumChild()

+	 * @generated

+	 */

+	EAttribute getMediumChild_Name();

+

+	/**

+	 * Returns the factory that creates the instances of the model.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the factory that creates the instances of the model.

+	 * @generated

+	 */

+	PhantomsFactory getPhantomsFactory();

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * Defines literals for the meta objects that represent

+	 * <ul>

+	 *   <li>each class,</li>

+	 *   <li>each feature of each class,</li>

+	 *   <li>each operation of each class,</li>

+	 *   <li>each enum,</li>

+	 *   <li>and each data type</li>

+	 * </ul>

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	interface Literals {

+		/**

+		 * The meta object literal for the '{@link org.eclipse.gmf.tooling.examples.phantoms.impl.RootImpl <em>Root</em>}' class.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.RootImpl

+		 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl#getRoot()

+		 * @generated

+		 */

+		EClass ROOT = eINSTANCE.getRoot();

+

+		/**

+		 * The meta object literal for the '<em><b>Children</b></em>' containment reference list feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EReference ROOT__CHILDREN = eINSTANCE.getRoot_Children();

+

+		/**

+		 * The meta object literal for the '{@link org.eclipse.gmf.tooling.examples.phantoms.impl.RootChildImpl <em>Root Child</em>}' class.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.RootChildImpl

+		 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl#getRootChild()

+		 * @generated

+		 */

+		EClass ROOT_CHILD = eINSTANCE.getRootChild();

+

+		/**

+		 * The meta object literal for the '{@link org.eclipse.gmf.tooling.examples.phantoms.impl.TopParentImpl <em>Top Parent</em>}' class.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.TopParentImpl

+		 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl#getTopParent()

+		 * @generated

+		 */

+		EClass TOP_PARENT = eINSTANCE.getTopParent();

+

+		/**

+		 * The meta object literal for the '<em><b>Children</b></em>' containment reference list feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EReference TOP_PARENT__CHILDREN = eINSTANCE.getTopParent_Children();

+

+		/**

+		 * The meta object literal for the '{@link org.eclipse.gmf.tooling.examples.phantoms.impl.MediumImpl <em>Medium</em>}' class.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.MediumImpl

+		 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl#getMedium()

+		 * @generated

+		 */

+		EClass MEDIUM = eINSTANCE.getMedium();

+

+		/**

+		 * The meta object literal for the '<em><b>Children</b></em>' containment reference list feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EReference MEDIUM__CHILDREN = eINSTANCE.getMedium_Children();

+

+		/**

+		 * The meta object literal for the '{@link org.eclipse.gmf.tooling.examples.phantoms.impl.TopChildImpl <em>Top Child</em>}' class.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.TopChildImpl

+		 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl#getTopChild()

+		 * @generated

+		 */

+		EClass TOP_CHILD = eINSTANCE.getTopChild();

+

+		/**

+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EAttribute TOP_CHILD__NAME = eINSTANCE.getTopChild_Name();

+

+		/**

+		 * The meta object literal for the '{@link org.eclipse.gmf.tooling.examples.phantoms.impl.MediumParentImpl <em>Medium Parent</em>}' class.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.MediumParentImpl

+		 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl#getMediumParent()

+		 * @generated

+		 */

+		EClass MEDIUM_PARENT = eINSTANCE.getMediumParent();

+

+		/**

+		 * The meta object literal for the '<em><b>Children</b></em>' containment reference list feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EReference MEDIUM_PARENT__CHILDREN = eINSTANCE.getMediumParent_Children();

+

+		/**

+		 * The meta object literal for the '{@link org.eclipse.gmf.tooling.examples.phantoms.impl.MediumChildImpl <em>Medium Child</em>}' class.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.MediumChildImpl

+		 * @see org.eclipse.gmf.tooling.examples.phantoms.impl.PhantomsPackageImpl#getMediumChild()

+		 * @generated

+		 */

+		EClass MEDIUM_CHILD = eINSTANCE.getMediumChild();

+

+		/**

+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.

+		 * <!-- begin-user-doc -->

+		 * <!-- end-user-doc -->

+		 * @generated

+		 */

+		EAttribute MEDIUM_CHILD__NAME = eINSTANCE.getMediumChild_Name();

+

+	}

+

+} //PhantomsPackage

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/Root.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/Root.java
new file mode 100755
index 0000000..c14562e
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/Root.java
@@ -0,0 +1,42 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms;

+

+import org.eclipse.emf.common.util.EList;

+

+import org.eclipse.emf.ecore.EObject;

+

+/**

+ * <!-- begin-user-doc -->

+ * A representation of the model object '<em><b>Root</b></em>'.

+ * <!-- end-user-doc -->

+ *

+ * <p>

+ * The following features are supported:

+ * <ul>

+ *   <li>{@link org.eclipse.gmf.tooling.examples.phantoms.Root#getChildren <em>Children</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage#getRoot()

+ * @model

+ * @generated

+ */

+public interface Root extends EObject {

+	/**

+	 * Returns the value of the '<em><b>Children</b></em>' containment reference list.

+	 * The list contents are of type {@link org.eclipse.gmf.tooling.examples.phantoms.RootChild}.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Children</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>Children</em>' containment reference list.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage#getRoot_Children()

+	 * @model containment="true"

+	 * @generated

+	 */

+	EList<RootChild> getChildren();

+

+} // Root

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/RootChild.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/RootChild.java
new file mode 100755
index 0000000..e853887
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/RootChild.java
@@ -0,0 +1,18 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms;

+

+import org.eclipse.emf.ecore.EObject;

+

+/**

+ * <!-- begin-user-doc -->

+ * A representation of the model object '<em><b>Root Child</b></em>'.

+ * <!-- end-user-doc -->

+ *

+ *

+ * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage#getRootChild()

+ * @model

+ * @generated

+ */

+public interface RootChild extends EObject {

+} // RootChild

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/TopChild.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/TopChild.java
new file mode 100755
index 0000000..dce34ca
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/TopChild.java
@@ -0,0 +1,51 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms;

+

+import org.eclipse.emf.ecore.EObject;

+

+/**

+ * <!-- begin-user-doc -->

+ * A representation of the model object '<em><b>Top Child</b></em>'.

+ * <!-- end-user-doc -->

+ *

+ * <p>

+ * The following features are supported:

+ * <ul>

+ *   <li>{@link org.eclipse.gmf.tooling.examples.phantoms.TopChild#getName <em>Name</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage#getTopChild()

+ * @model

+ * @generated

+ */

+public interface TopChild extends EObject {

+	/**

+	 * Returns the value of the '<em><b>Name</b></em>' attribute.

+	 * The default value is <code>"TopChild"</code>.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,

+	 * there really should be more of a description here...

+	 * </p>

+	 * <!-- end-user-doc -->

+	 * @return the value of the '<em>Name</em>' attribute.

+	 * @see #setName(String)

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage#getTopChild_Name()

+	 * @model default="TopChild"

+	 * @generated

+	 */

+	String getName();

+

+	/**

+	 * Sets the value of the '{@link org.eclipse.gmf.tooling.examples.phantoms.TopChild#getName <em>Name</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @param value the new value of the '<em>Name</em>' attribute.

+	 * @see #getName()

+	 * @generated

+	 */

+	void setName(String value);

+

+} // TopChild

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/TopParent.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/TopParent.java
new file mode 100755
index 0000000..568f900
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/TopParent.java
@@ -0,0 +1,40 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms;

+

+import org.eclipse.emf.common.util.EList;

+

+/**

+ * <!-- begin-user-doc -->

+ * A representation of the model object '<em><b>Top Parent</b></em>'.

+ * <!-- end-user-doc -->

+ *

+ * <p>

+ * The following features are supported:

+ * <ul>

+ *   <li>{@link org.eclipse.gmf.tooling.examples.phantoms.TopParent#getChildren <em>Children</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage#getTopParent()

+ * @model

+ * @generated

+ */

+public interface TopParent extends RootChild {

+	/**

+	 * Returns the value of the '<em><b>Children</b></em>' containment reference list.

+	 * The list contents are of type {@link org.eclipse.gmf.tooling.examples.phantoms.TopChild}.

+	 * <!-- begin-user-doc -->

+	 * <p>

+	 * If the meaning of the '<em>Children</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>Children</em>' containment reference list.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage#getTopParent_Children()

+	 * @model containment="true"

+	 * @generated

+	 */

+	EList<TopChild> getChildren();

+

+} // TopParent

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/MediumChildImpl.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/MediumChildImpl.java
new file mode 100755
index 0000000..22c0acb
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/MediumChildImpl.java
@@ -0,0 +1,163 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms.impl;

+

+import org.eclipse.emf.common.notify.Notification;

+

+import org.eclipse.emf.ecore.EClass;

+

+import org.eclipse.emf.ecore.impl.ENotificationImpl;

+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

+

+import org.eclipse.gmf.tooling.examples.phantoms.MediumChild;

+import org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model object '<em><b>Medium Child</b></em>'.

+ * <!-- end-user-doc -->

+ * <p>

+ * The following features are implemented:

+ * <ul>

+ *   <li>{@link org.eclipse.gmf.tooling.examples.phantoms.impl.MediumChildImpl#getName <em>Name</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @generated

+ */

+public class MediumChildImpl extends MinimalEObjectImpl.Container implements MediumChild {

+	/**

+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getName()

+	 * @generated

+	 * @ordered

+	 */

+	protected static final String NAME_EDEFAULT = "MediumChild";

+

+	/**

+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getName()

+	 * @generated

+	 * @ordered

+	 */

+	protected String name = NAME_EDEFAULT;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected MediumChildImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	protected EClass eStaticClass() {

+		return PhantomsPackage.Literals.MEDIUM_CHILD;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public String getName() {

+		return name;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public void setName(String newName) {

+		String oldName = name;

+		name = newName;

+		if (eNotificationRequired())

+			eNotify(new ENotificationImpl(this, Notification.SET, PhantomsPackage.MEDIUM_CHILD__NAME, oldName, name));

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public Object eGet(int featureID, boolean resolve, boolean coreType) {

+		switch (featureID) {

+			case PhantomsPackage.MEDIUM_CHILD__NAME:

+				return getName();

+		}

+		return super.eGet(featureID, resolve, coreType);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eSet(int featureID, Object newValue) {

+		switch (featureID) {

+			case PhantomsPackage.MEDIUM_CHILD__NAME:

+				setName((String)newValue);

+				return;

+		}

+		super.eSet(featureID, newValue);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eUnset(int featureID) {

+		switch (featureID) {

+			case PhantomsPackage.MEDIUM_CHILD__NAME:

+				setName(NAME_EDEFAULT);

+				return;

+		}

+		super.eUnset(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public boolean eIsSet(int featureID) {

+		switch (featureID) {

+			case PhantomsPackage.MEDIUM_CHILD__NAME:

+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);

+		}

+		return super.eIsSet(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public String toString() {

+		if (eIsProxy()) return super.toString();

+

+		StringBuffer result = new StringBuffer(super.toString());

+		result.append(" (name: ");

+		result.append(name);

+		result.append(')');

+		return result.toString();

+	}

+

+} //MediumChildImpl

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/MediumImpl.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/MediumImpl.java
new file mode 100755
index 0000000..dac09f8
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/MediumImpl.java
@@ -0,0 +1,150 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms.impl;

+

+import java.util.Collection;

+

+import org.eclipse.emf.common.notify.NotificationChain;

+

+import org.eclipse.emf.common.util.EList;

+

+import org.eclipse.emf.ecore.EClass;

+import org.eclipse.emf.ecore.InternalEObject;

+

+import org.eclipse.emf.ecore.util.EObjectContainmentEList;

+import org.eclipse.emf.ecore.util.InternalEList;

+

+import org.eclipse.gmf.tooling.examples.phantoms.Medium;

+import org.eclipse.gmf.tooling.examples.phantoms.MediumParent;

+import org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model object '<em><b>Medium</b></em>'.

+ * <!-- end-user-doc -->

+ * <p>

+ * The following features are implemented:

+ * <ul>

+ *   <li>{@link org.eclipse.gmf.tooling.examples.phantoms.impl.MediumImpl#getChildren <em>Children</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @generated

+ */

+public class MediumImpl extends RootChildImpl implements Medium {

+	/**

+	 * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getChildren()

+	 * @generated

+	 * @ordered

+	 */

+	protected EList<MediumParent> children;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected MediumImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	protected EClass eStaticClass() {

+		return PhantomsPackage.Literals.MEDIUM;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EList<MediumParent> getChildren() {

+		if (children == null) {

+			children = new EObjectContainmentEList<MediumParent>(MediumParent.class, this, PhantomsPackage.MEDIUM__CHILDREN);

+		}

+		return children;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {

+		switch (featureID) {

+			case PhantomsPackage.MEDIUM__CHILDREN:

+				return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs);

+		}

+		return super.eInverseRemove(otherEnd, featureID, msgs);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public Object eGet(int featureID, boolean resolve, boolean coreType) {

+		switch (featureID) {

+			case PhantomsPackage.MEDIUM__CHILDREN:

+				return getChildren();

+		}

+		return super.eGet(featureID, resolve, coreType);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@SuppressWarnings("unchecked")

+	@Override

+	public void eSet(int featureID, Object newValue) {

+		switch (featureID) {

+			case PhantomsPackage.MEDIUM__CHILDREN:

+				getChildren().clear();

+				getChildren().addAll((Collection<? extends MediumParent>)newValue);

+				return;

+		}

+		super.eSet(featureID, newValue);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eUnset(int featureID) {

+		switch (featureID) {

+			case PhantomsPackage.MEDIUM__CHILDREN:

+				getChildren().clear();

+				return;

+		}

+		super.eUnset(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public boolean eIsSet(int featureID) {

+		switch (featureID) {

+			case PhantomsPackage.MEDIUM__CHILDREN:

+				return children != null && !children.isEmpty();

+		}

+		return super.eIsSet(featureID);

+	}

+

+} //MediumImpl

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/MediumParentImpl.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/MediumParentImpl.java
new file mode 100755
index 0000000..fef5c7d
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/MediumParentImpl.java
@@ -0,0 +1,152 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms.impl;

+

+import java.util.Collection;

+

+import org.eclipse.emf.common.notify.NotificationChain;

+

+import org.eclipse.emf.common.util.EList;

+

+import org.eclipse.emf.ecore.EClass;

+import org.eclipse.emf.ecore.InternalEObject;

+

+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

+

+import org.eclipse.emf.ecore.util.EObjectContainmentEList;

+import org.eclipse.emf.ecore.util.InternalEList;

+

+import org.eclipse.gmf.tooling.examples.phantoms.MediumChild;

+import org.eclipse.gmf.tooling.examples.phantoms.MediumParent;

+import org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model object '<em><b>Medium Parent</b></em>'.

+ * <!-- end-user-doc -->

+ * <p>

+ * The following features are implemented:

+ * <ul>

+ *   <li>{@link org.eclipse.gmf.tooling.examples.phantoms.impl.MediumParentImpl#getChildren <em>Children</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @generated

+ */

+public class MediumParentImpl extends MinimalEObjectImpl.Container implements MediumParent {

+	/**

+	 * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getChildren()

+	 * @generated

+	 * @ordered

+	 */

+	protected EList<MediumChild> children;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected MediumParentImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	protected EClass eStaticClass() {

+		return PhantomsPackage.Literals.MEDIUM_PARENT;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EList<MediumChild> getChildren() {

+		if (children == null) {

+			children = new EObjectContainmentEList<MediumChild>(MediumChild.class, this, PhantomsPackage.MEDIUM_PARENT__CHILDREN);

+		}

+		return children;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {

+		switch (featureID) {

+			case PhantomsPackage.MEDIUM_PARENT__CHILDREN:

+				return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs);

+		}

+		return super.eInverseRemove(otherEnd, featureID, msgs);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public Object eGet(int featureID, boolean resolve, boolean coreType) {

+		switch (featureID) {

+			case PhantomsPackage.MEDIUM_PARENT__CHILDREN:

+				return getChildren();

+		}

+		return super.eGet(featureID, resolve, coreType);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@SuppressWarnings("unchecked")

+	@Override

+	public void eSet(int featureID, Object newValue) {

+		switch (featureID) {

+			case PhantomsPackage.MEDIUM_PARENT__CHILDREN:

+				getChildren().clear();

+				getChildren().addAll((Collection<? extends MediumChild>)newValue);

+				return;

+		}

+		super.eSet(featureID, newValue);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eUnset(int featureID) {

+		switch (featureID) {

+			case PhantomsPackage.MEDIUM_PARENT__CHILDREN:

+				getChildren().clear();

+				return;

+		}

+		super.eUnset(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public boolean eIsSet(int featureID) {

+		switch (featureID) {

+			case PhantomsPackage.MEDIUM_PARENT__CHILDREN:

+				return children != null && !children.isEmpty();

+		}

+		return super.eIsSet(featureID);

+	}

+

+} //MediumParentImpl

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/PhantomsFactoryImpl.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/PhantomsFactoryImpl.java
new file mode 100755
index 0000000..195f6a9
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/PhantomsFactoryImpl.java
@@ -0,0 +1,161 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms.impl;

+

+import org.eclipse.emf.ecore.EClass;

+import org.eclipse.emf.ecore.EObject;

+import org.eclipse.emf.ecore.EPackage;

+

+import org.eclipse.emf.ecore.impl.EFactoryImpl;

+

+import org.eclipse.emf.ecore.plugin.EcorePlugin;

+

+import org.eclipse.gmf.tooling.examples.phantoms.*;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model <b>Factory</b>.

+ * <!-- end-user-doc -->

+ * @generated

+ */

+public class PhantomsFactoryImpl extends EFactoryImpl implements PhantomsFactory {

+	/**

+	 * Creates the default factory implementation.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public static PhantomsFactory init() {

+		try {

+			PhantomsFactory thePhantomsFactory = (PhantomsFactory)EPackage.Registry.INSTANCE.getEFactory(PhantomsPackage.eNS_URI);

+			if (thePhantomsFactory != null) {

+				return thePhantomsFactory;

+			}

+		}

+		catch (Exception exception) {

+			EcorePlugin.INSTANCE.log(exception);

+		}

+		return new PhantomsFactoryImpl();

+	}

+

+	/**

+	 * Creates an instance of the factory.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public PhantomsFactoryImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public EObject create(EClass eClass) {

+		switch (eClass.getClassifierID()) {

+			case PhantomsPackage.ROOT: return createRoot();

+			case PhantomsPackage.ROOT_CHILD: return createRootChild();

+			case PhantomsPackage.TOP_PARENT: return createTopParent();

+			case PhantomsPackage.MEDIUM: return createMedium();

+			case PhantomsPackage.TOP_CHILD: return createTopChild();

+			case PhantomsPackage.MEDIUM_PARENT: return createMediumParent();

+			case PhantomsPackage.MEDIUM_CHILD: return createMediumChild();

+			default:

+				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");

+		}

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public Root createRoot() {

+		RootImpl root = new RootImpl();

+		return root;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public RootChild createRootChild() {

+		RootChildImpl rootChild = new RootChildImpl();

+		return rootChild;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public TopParent createTopParent() {

+		TopParentImpl topParent = new TopParentImpl();

+		return topParent;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public Medium createMedium() {

+		MediumImpl medium = new MediumImpl();

+		return medium;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public TopChild createTopChild() {

+		TopChildImpl topChild = new TopChildImpl();

+		return topChild;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public MediumParent createMediumParent() {

+		MediumParentImpl mediumParent = new MediumParentImpl();

+		return mediumParent;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public MediumChild createMediumChild() {

+		MediumChildImpl mediumChild = new MediumChildImpl();

+		return mediumChild;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public PhantomsPackage getPhantomsPackage() {

+		return (PhantomsPackage)getEPackage();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @deprecated

+	 * @generated

+	 */

+	@Deprecated

+	public static PhantomsPackage getPackage() {

+		return PhantomsPackage.eINSTANCE;

+	}

+

+} //PhantomsFactoryImpl

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/PhantomsPackageImpl.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/PhantomsPackageImpl.java
new file mode 100755
index 0000000..e96bf79
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/PhantomsPackageImpl.java
@@ -0,0 +1,361 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms.impl;

+

+import org.eclipse.emf.ecore.EAttribute;

+import org.eclipse.emf.ecore.EClass;

+import org.eclipse.emf.ecore.EPackage;

+import org.eclipse.emf.ecore.EReference;

+

+import org.eclipse.emf.ecore.impl.EPackageImpl;

+

+import org.eclipse.gmf.tooling.examples.phantoms.Medium;

+import org.eclipse.gmf.tooling.examples.phantoms.MediumChild;

+import org.eclipse.gmf.tooling.examples.phantoms.MediumParent;

+import org.eclipse.gmf.tooling.examples.phantoms.PhantomsFactory;

+import org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage;

+import org.eclipse.gmf.tooling.examples.phantoms.Root;

+import org.eclipse.gmf.tooling.examples.phantoms.RootChild;

+import org.eclipse.gmf.tooling.examples.phantoms.TopChild;

+import org.eclipse.gmf.tooling.examples.phantoms.TopParent;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model <b>Package</b>.

+ * <!-- end-user-doc -->

+ * @generated

+ */

+public class PhantomsPackageImpl extends EPackageImpl implements PhantomsPackage {

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private EClass rootEClass = null;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private EClass rootChildEClass = null;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private EClass topParentEClass = null;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private EClass mediumEClass = null;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private EClass topChildEClass = null;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private EClass mediumParentEClass = null;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private EClass mediumChildEClass = null;

+

+	/**

+	 * Creates an instance of the model <b>Package</b>, registered with

+	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package

+	 * package URI value.

+	 * <p>Note: the correct way to create the package is via the static

+	 * factory method {@link #init init()}, which also performs

+	 * initialization of the package, or returns the registered package,

+	 * if one already exists.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see org.eclipse.emf.ecore.EPackage.Registry

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage#eNS_URI

+	 * @see #init()

+	 * @generated

+	 */

+	private PhantomsPackageImpl() {

+		super(eNS_URI, PhantomsFactory.eINSTANCE);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private static boolean isInited = false;

+

+	/**

+	 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.

+	 * 

+	 * <p>This method is used to initialize {@link PhantomsPackage#eINSTANCE} when that field is accessed.

+	 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #eNS_URI

+	 * @see #createPackageContents()

+	 * @see #initializePackageContents()

+	 * @generated

+	 */

+	public static PhantomsPackage init() {

+		if (isInited) return (PhantomsPackage)EPackage.Registry.INSTANCE.getEPackage(PhantomsPackage.eNS_URI);

+

+		// Obtain or create and register package

+		PhantomsPackageImpl thePhantomsPackage = (PhantomsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PhantomsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PhantomsPackageImpl());

+

+		isInited = true;

+

+		// Create package meta-data objects

+		thePhantomsPackage.createPackageContents();

+

+		// Initialize created meta-data

+		thePhantomsPackage.initializePackageContents();

+

+		// Mark meta-data to indicate it can't be changed

+		thePhantomsPackage.freeze();

+

+  

+		// Update the registry and return the package

+		EPackage.Registry.INSTANCE.put(PhantomsPackage.eNS_URI, thePhantomsPackage);

+		return thePhantomsPackage;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EClass getRoot() {

+		return rootEClass;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EReference getRoot_Children() {

+		return (EReference)rootEClass.getEStructuralFeatures().get(0);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EClass getRootChild() {

+		return rootChildEClass;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EClass getTopParent() {

+		return topParentEClass;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EReference getTopParent_Children() {

+		return (EReference)topParentEClass.getEStructuralFeatures().get(0);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EClass getMedium() {

+		return mediumEClass;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EReference getMedium_Children() {

+		return (EReference)mediumEClass.getEStructuralFeatures().get(0);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EClass getTopChild() {

+		return topChildEClass;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EAttribute getTopChild_Name() {

+		return (EAttribute)topChildEClass.getEStructuralFeatures().get(0);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EClass getMediumParent() {

+		return mediumParentEClass;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EReference getMediumParent_Children() {

+		return (EReference)mediumParentEClass.getEStructuralFeatures().get(0);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EClass getMediumChild() {

+		return mediumChildEClass;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EAttribute getMediumChild_Name() {

+		return (EAttribute)mediumChildEClass.getEStructuralFeatures().get(0);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public PhantomsFactory getPhantomsFactory() {

+		return (PhantomsFactory)getEFactoryInstance();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private boolean isCreated = false;

+

+	/**

+	 * Creates the meta-model objects for the package.  This method is

+	 * guarded to have no affect on any invocation but its first.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public void createPackageContents() {

+		if (isCreated) return;

+		isCreated = true;

+

+		// Create classes and their features

+		rootEClass = createEClass(ROOT);

+		createEReference(rootEClass, ROOT__CHILDREN);

+

+		rootChildEClass = createEClass(ROOT_CHILD);

+

+		topParentEClass = createEClass(TOP_PARENT);

+		createEReference(topParentEClass, TOP_PARENT__CHILDREN);

+

+		mediumEClass = createEClass(MEDIUM);

+		createEReference(mediumEClass, MEDIUM__CHILDREN);

+

+		topChildEClass = createEClass(TOP_CHILD);

+		createEAttribute(topChildEClass, TOP_CHILD__NAME);

+

+		mediumParentEClass = createEClass(MEDIUM_PARENT);

+		createEReference(mediumParentEClass, MEDIUM_PARENT__CHILDREN);

+

+		mediumChildEClass = createEClass(MEDIUM_CHILD);

+		createEAttribute(mediumChildEClass, MEDIUM_CHILD__NAME);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	private boolean isInitialized = false;

+

+	/**

+	 * Complete the initialization of the package and its meta-model.  This

+	 * method is guarded to have no affect on any invocation but its first.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public void initializePackageContents() {

+		if (isInitialized) return;

+		isInitialized = true;

+

+		// Initialize package

+		setName(eNAME);

+		setNsPrefix(eNS_PREFIX);

+		setNsURI(eNS_URI);

+

+		// Create type parameters

+

+		// Set bounds for type parameters

+

+		// Add supertypes to classes

+		topParentEClass.getESuperTypes().add(this.getRootChild());

+		mediumEClass.getESuperTypes().add(this.getRootChild());

+

+		// Initialize classes, features, and operations; add parameters

+		initEClass(rootEClass, Root.class, "Root", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

+		initEReference(getRoot_Children(), this.getRootChild(), null, "children", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+

+		initEClass(rootChildEClass, RootChild.class, "RootChild", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

+

+		initEClass(topParentEClass, TopParent.class, "TopParent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

+		initEReference(getTopParent_Children(), this.getTopChild(), null, "children", null, 0, -1, TopParent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+

+		initEClass(mediumEClass, Medium.class, "Medium", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

+		initEReference(getMedium_Children(), this.getMediumParent(), null, "children", null, 0, -1, Medium.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+

+		initEClass(topChildEClass, TopChild.class, "TopChild", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

+		initEAttribute(getTopChild_Name(), ecorePackage.getEString(), "name", "TopChild", 0, 1, TopChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+

+		initEClass(mediumParentEClass, MediumParent.class, "MediumParent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

+		initEReference(getMediumParent_Children(), this.getMediumChild(), null, "children", null, 0, -1, MediumParent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+

+		initEClass(mediumChildEClass, MediumChild.class, "MediumChild", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

+		initEAttribute(getMediumChild_Name(), ecorePackage.getEString(), "name", "MediumChild", 0, 1, MediumChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

+

+		// Create resource

+		createResource(eNS_URI);

+	}

+

+} //PhantomsPackageImpl

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/RootChildImpl.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/RootChildImpl.java
new file mode 100755
index 0000000..a270fcc
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/RootChildImpl.java
@@ -0,0 +1,41 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms.impl;

+

+import org.eclipse.emf.ecore.EClass;

+

+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

+

+import org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage;

+import org.eclipse.gmf.tooling.examples.phantoms.RootChild;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model object '<em><b>Root Child</b></em>'.

+ * <!-- end-user-doc -->

+ * <p>

+ * </p>

+ *

+ * @generated

+ */

+public class RootChildImpl extends MinimalEObjectImpl.Container implements RootChild {

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected RootChildImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	protected EClass eStaticClass() {

+		return PhantomsPackage.Literals.ROOT_CHILD;

+	}

+

+} //RootChildImpl

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/RootImpl.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/RootImpl.java
new file mode 100755
index 0000000..9072f07
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/RootImpl.java
@@ -0,0 +1,152 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms.impl;

+

+import java.util.Collection;

+

+import org.eclipse.emf.common.notify.NotificationChain;

+

+import org.eclipse.emf.common.util.EList;

+

+import org.eclipse.emf.ecore.EClass;

+import org.eclipse.emf.ecore.InternalEObject;

+

+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

+

+import org.eclipse.emf.ecore.util.EObjectContainmentEList;

+import org.eclipse.emf.ecore.util.InternalEList;

+

+import org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage;

+import org.eclipse.gmf.tooling.examples.phantoms.Root;

+import org.eclipse.gmf.tooling.examples.phantoms.RootChild;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model object '<em><b>Root</b></em>'.

+ * <!-- end-user-doc -->

+ * <p>

+ * The following features are implemented:

+ * <ul>

+ *   <li>{@link org.eclipse.gmf.tooling.examples.phantoms.impl.RootImpl#getChildren <em>Children</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @generated

+ */

+public class RootImpl extends MinimalEObjectImpl.Container implements Root {

+	/**

+	 * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getChildren()

+	 * @generated

+	 * @ordered

+	 */

+	protected EList<RootChild> children;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected RootImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	protected EClass eStaticClass() {

+		return PhantomsPackage.Literals.ROOT;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EList<RootChild> getChildren() {

+		if (children == null) {

+			children = new EObjectContainmentEList<RootChild>(RootChild.class, this, PhantomsPackage.ROOT__CHILDREN);

+		}

+		return children;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {

+		switch (featureID) {

+			case PhantomsPackage.ROOT__CHILDREN:

+				return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs);

+		}

+		return super.eInverseRemove(otherEnd, featureID, msgs);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public Object eGet(int featureID, boolean resolve, boolean coreType) {

+		switch (featureID) {

+			case PhantomsPackage.ROOT__CHILDREN:

+				return getChildren();

+		}

+		return super.eGet(featureID, resolve, coreType);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@SuppressWarnings("unchecked")

+	@Override

+	public void eSet(int featureID, Object newValue) {

+		switch (featureID) {

+			case PhantomsPackage.ROOT__CHILDREN:

+				getChildren().clear();

+				getChildren().addAll((Collection<? extends RootChild>)newValue);

+				return;

+		}

+		super.eSet(featureID, newValue);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eUnset(int featureID) {

+		switch (featureID) {

+			case PhantomsPackage.ROOT__CHILDREN:

+				getChildren().clear();

+				return;

+		}

+		super.eUnset(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public boolean eIsSet(int featureID) {

+		switch (featureID) {

+			case PhantomsPackage.ROOT__CHILDREN:

+				return children != null && !children.isEmpty();

+		}

+		return super.eIsSet(featureID);

+	}

+

+} //RootImpl

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/TopChildImpl.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/TopChildImpl.java
new file mode 100755
index 0000000..6ea87fc
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/TopChildImpl.java
@@ -0,0 +1,163 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms.impl;

+

+import org.eclipse.emf.common.notify.Notification;

+

+import org.eclipse.emf.ecore.EClass;

+

+import org.eclipse.emf.ecore.impl.ENotificationImpl;

+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

+

+import org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage;

+import org.eclipse.gmf.tooling.examples.phantoms.TopChild;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model object '<em><b>Top Child</b></em>'.

+ * <!-- end-user-doc -->

+ * <p>

+ * The following features are implemented:

+ * <ul>

+ *   <li>{@link org.eclipse.gmf.tooling.examples.phantoms.impl.TopChildImpl#getName <em>Name</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @generated

+ */

+public class TopChildImpl extends MinimalEObjectImpl.Container implements TopChild {

+	/**

+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getName()

+	 * @generated

+	 * @ordered

+	 */

+	protected static final String NAME_EDEFAULT = "TopChild";

+

+	/**

+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getName()

+	 * @generated

+	 * @ordered

+	 */

+	protected String name = NAME_EDEFAULT;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected TopChildImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	protected EClass eStaticClass() {

+		return PhantomsPackage.Literals.TOP_CHILD;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public String getName() {

+		return name;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public void setName(String newName) {

+		String oldName = name;

+		name = newName;

+		if (eNotificationRequired())

+			eNotify(new ENotificationImpl(this, Notification.SET, PhantomsPackage.TOP_CHILD__NAME, oldName, name));

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public Object eGet(int featureID, boolean resolve, boolean coreType) {

+		switch (featureID) {

+			case PhantomsPackage.TOP_CHILD__NAME:

+				return getName();

+		}

+		return super.eGet(featureID, resolve, coreType);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eSet(int featureID, Object newValue) {

+		switch (featureID) {

+			case PhantomsPackage.TOP_CHILD__NAME:

+				setName((String)newValue);

+				return;

+		}

+		super.eSet(featureID, newValue);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eUnset(int featureID) {

+		switch (featureID) {

+			case PhantomsPackage.TOP_CHILD__NAME:

+				setName(NAME_EDEFAULT);

+				return;

+		}

+		super.eUnset(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public boolean eIsSet(int featureID) {

+		switch (featureID) {

+			case PhantomsPackage.TOP_CHILD__NAME:

+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);

+		}

+		return super.eIsSet(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public String toString() {

+		if (eIsProxy()) return super.toString();

+

+		StringBuffer result = new StringBuffer(super.toString());

+		result.append(" (name: ");

+		result.append(name);

+		result.append(')');

+		return result.toString();

+	}

+

+} //TopChildImpl

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/TopParentImpl.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/TopParentImpl.java
new file mode 100755
index 0000000..7ee0cd9
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/impl/TopParentImpl.java
@@ -0,0 +1,150 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms.impl;

+

+import java.util.Collection;

+

+import org.eclipse.emf.common.notify.NotificationChain;

+

+import org.eclipse.emf.common.util.EList;

+

+import org.eclipse.emf.ecore.EClass;

+import org.eclipse.emf.ecore.InternalEObject;

+

+import org.eclipse.emf.ecore.util.EObjectContainmentEList;

+import org.eclipse.emf.ecore.util.InternalEList;

+

+import org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage;

+import org.eclipse.gmf.tooling.examples.phantoms.TopChild;

+import org.eclipse.gmf.tooling.examples.phantoms.TopParent;

+

+/**

+ * <!-- begin-user-doc -->

+ * An implementation of the model object '<em><b>Top Parent</b></em>'.

+ * <!-- end-user-doc -->

+ * <p>

+ * The following features are implemented:

+ * <ul>

+ *   <li>{@link org.eclipse.gmf.tooling.examples.phantoms.impl.TopParentImpl#getChildren <em>Children</em>}</li>

+ * </ul>

+ * </p>

+ *

+ * @generated

+ */

+public class TopParentImpl extends RootChildImpl implements TopParent {

+	/**

+	 * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @see #getChildren()

+	 * @generated

+	 * @ordered

+	 */

+	protected EList<TopChild> children;

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected TopParentImpl() {

+		super();

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	protected EClass eStaticClass() {

+		return PhantomsPackage.Literals.TOP_PARENT;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public EList<TopChild> getChildren() {

+		if (children == null) {

+			children = new EObjectContainmentEList<TopChild>(TopChild.class, this, PhantomsPackage.TOP_PARENT__CHILDREN);

+		}

+		return children;

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {

+		switch (featureID) {

+			case PhantomsPackage.TOP_PARENT__CHILDREN:

+				return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs);

+		}

+		return super.eInverseRemove(otherEnd, featureID, msgs);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public Object eGet(int featureID, boolean resolve, boolean coreType) {

+		switch (featureID) {

+			case PhantomsPackage.TOP_PARENT__CHILDREN:

+				return getChildren();

+		}

+		return super.eGet(featureID, resolve, coreType);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@SuppressWarnings("unchecked")

+	@Override

+	public void eSet(int featureID, Object newValue) {

+		switch (featureID) {

+			case PhantomsPackage.TOP_PARENT__CHILDREN:

+				getChildren().clear();

+				getChildren().addAll((Collection<? extends TopChild>)newValue);

+				return;

+		}

+		super.eSet(featureID, newValue);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public void eUnset(int featureID) {

+		switch (featureID) {

+			case PhantomsPackage.TOP_PARENT__CHILDREN:

+				getChildren().clear();

+				return;

+		}

+		super.eUnset(featureID);

+	}

+

+	/**

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	@Override

+	public boolean eIsSet(int featureID) {

+		switch (featureID) {

+			case PhantomsPackage.TOP_PARENT__CHILDREN:

+				return children != null && !children.isEmpty();

+		}

+		return super.eIsSet(featureID);

+	}

+

+} //TopParentImpl

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/util/PhantomsAdapterFactory.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/util/PhantomsAdapterFactory.java
new file mode 100755
index 0000000..7cc4afd
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/util/PhantomsAdapterFactory.java
@@ -0,0 +1,228 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms.util;

+

+import org.eclipse.emf.common.notify.Adapter;

+import org.eclipse.emf.common.notify.Notifier;

+

+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;

+

+import org.eclipse.emf.ecore.EObject;

+

+import org.eclipse.gmf.tooling.examples.phantoms.*;

+

+/**

+ * <!-- begin-user-doc -->

+ * The <b>Adapter Factory</b> for the model.

+ * It provides an adapter <code>createXXX</code> method for each class of the model.

+ * <!-- end-user-doc -->

+ * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage

+ * @generated

+ */

+public class PhantomsAdapterFactory extends AdapterFactoryImpl {

+	/**

+	 * The cached model package.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected static PhantomsPackage modelPackage;

+

+	/**

+	 * Creates an instance of the adapter factory.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public PhantomsAdapterFactory() {

+		if (modelPackage == null) {

+			modelPackage = PhantomsPackage.eINSTANCE;

+		}

+	}

+

+	/**

+	 * Returns whether this factory is applicable for the type of the object.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.

+	 * <!-- end-user-doc -->

+	 * @return whether this factory is applicable for the type of the object.

+	 * @generated

+	 */

+	@Override

+	public boolean isFactoryForType(Object object) {

+		if (object == modelPackage) {

+			return true;

+		}

+		if (object instanceof EObject) {

+			return ((EObject)object).eClass().getEPackage() == modelPackage;

+		}

+		return false;

+	}

+

+	/**

+	 * The switch that delegates to the <code>createXXX</code> methods.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected PhantomsSwitch<Adapter> modelSwitch =

+		new PhantomsSwitch<Adapter>() {

+			@Override

+			public Adapter caseRoot(Root object) {

+				return createRootAdapter();

+			}

+			@Override

+			public Adapter caseRootChild(RootChild object) {

+				return createRootChildAdapter();

+			}

+			@Override

+			public Adapter caseTopParent(TopParent object) {

+				return createTopParentAdapter();

+			}

+			@Override

+			public Adapter caseMedium(Medium object) {

+				return createMediumAdapter();

+			}

+			@Override

+			public Adapter caseTopChild(TopChild object) {

+				return createTopChildAdapter();

+			}

+			@Override

+			public Adapter caseMediumParent(MediumParent object) {

+				return createMediumParentAdapter();

+			}

+			@Override

+			public Adapter caseMediumChild(MediumChild object) {

+				return createMediumChildAdapter();

+			}

+			@Override

+			public Adapter defaultCase(EObject object) {

+				return createEObjectAdapter();

+			}

+		};

+

+	/**

+	 * Creates an adapter for the <code>target</code>.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @param target the object to adapt.

+	 * @return the adapter for the <code>target</code>.

+	 * @generated

+	 */

+	@Override

+	public Adapter createAdapter(Notifier target) {

+		return modelSwitch.doSwitch((EObject)target);

+	}

+

+

+	/**

+	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.tooling.examples.phantoms.Root <em>Root</em>}'.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null so that we can easily ignore cases;

+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.Root

+	 * @generated

+	 */

+	public Adapter createRootAdapter() {

+		return null;

+	}

+

+	/**

+	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.tooling.examples.phantoms.RootChild <em>Root Child</em>}'.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null so that we can easily ignore cases;

+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.RootChild

+	 * @generated

+	 */

+	public Adapter createRootChildAdapter() {

+		return null;

+	}

+

+	/**

+	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.tooling.examples.phantoms.TopParent <em>Top Parent</em>}'.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null so that we can easily ignore cases;

+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.TopParent

+	 * @generated

+	 */

+	public Adapter createTopParentAdapter() {

+		return null;

+	}

+

+	/**

+	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.tooling.examples.phantoms.Medium <em>Medium</em>}'.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null so that we can easily ignore cases;

+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.Medium

+	 * @generated

+	 */

+	public Adapter createMediumAdapter() {

+		return null;

+	}

+

+	/**

+	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.tooling.examples.phantoms.TopChild <em>Top Child</em>}'.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null so that we can easily ignore cases;

+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.TopChild

+	 * @generated

+	 */

+	public Adapter createTopChildAdapter() {

+		return null;

+	}

+

+	/**

+	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.tooling.examples.phantoms.MediumParent <em>Medium Parent</em>}'.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null so that we can easily ignore cases;

+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.MediumParent

+	 * @generated

+	 */

+	public Adapter createMediumParentAdapter() {

+		return null;

+	}

+

+	/**

+	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.tooling.examples.phantoms.MediumChild <em>Medium Child</em>}'.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null so that we can easily ignore cases;

+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @see org.eclipse.gmf.tooling.examples.phantoms.MediumChild

+	 * @generated

+	 */

+	public Adapter createMediumChildAdapter() {

+		return null;

+	}

+

+	/**

+	 * Creates a new adapter for the default case.

+	 * <!-- begin-user-doc -->

+	 * This default implementation returns null.

+	 * <!-- end-user-doc -->

+	 * @return the new adapter.

+	 * @generated

+	 */

+	public Adapter createEObjectAdapter() {

+		return null;

+	}

+

+} //PhantomsAdapterFactory

diff --git a/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/util/PhantomsSwitch.java b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/util/PhantomsSwitch.java
new file mode 100755
index 0000000..c7ba9a2
--- /dev/null
+++ b/test-examples/phantoms/org.eclipse.gmf.tooling.examples.phantoms/src/org/eclipse/gmf/tooling/examples/phantoms/util/PhantomsSwitch.java
@@ -0,0 +1,238 @@
+/**

+ */

+package org.eclipse.gmf.tooling.examples.phantoms.util;

+

+import org.eclipse.emf.ecore.EObject;

+import org.eclipse.emf.ecore.EPackage;

+

+import org.eclipse.emf.ecore.util.Switch;

+

+import org.eclipse.gmf.tooling.examples.phantoms.*;

+

+/**

+ * <!-- begin-user-doc -->

+ * The <b>Switch</b> for the model's inheritance hierarchy.

+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}

+ * to invoke the <code>caseXXX</code> method for each class of the model,

+ * starting with the actual class of the object

+ * and proceeding up the inheritance hierarchy

+ * until a non-null result is returned,

+ * which is the result of the switch.

+ * <!-- end-user-doc -->

+ * @see org.eclipse.gmf.tooling.examples.phantoms.PhantomsPackage

+ * @generated

+ */

+public class PhantomsSwitch<T> extends Switch<T> {

+	/**

+	 * The cached model package

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	protected static PhantomsPackage modelPackage;

+

+	/**

+	 * Creates an instance of the switch.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @generated

+	 */

+	public PhantomsSwitch() {

+		if (modelPackage == null) {

+			modelPackage = PhantomsPackage.eINSTANCE;

+		}

+	}

+

+	/**

+	 * Checks whether this is a switch for the given package.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @parameter ePackage the package in question.

+	 * @return whether this is a switch for the given package.

+	 * @generated

+	 */

+	@Override

+	protected boolean isSwitchFor(EPackage ePackage) {

+		return ePackage == modelPackage;

+	}

+

+	/**

+	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.

+	 * <!-- begin-user-doc -->

+	 * <!-- end-user-doc -->

+	 * @return the first non-null result returned by a <code>caseXXX</code> call.

+	 * @generated

+	 */

+	@Override

+	protected T doSwitch(int classifierID, EObject theEObject) {

+		switch (classifierID) {

+			case PhantomsPackage.ROOT: {

+				Root root = (Root)theEObject;

+				T result = caseRoot(root);

+				if (result == null) result = defaultCase(theEObject);

+				return result;

+			}

+			case PhantomsPackage.ROOT_CHILD: {

+				RootChild rootChild = (RootChild)theEObject;

+				T result = caseRootChild(rootChild);

+				if (result == null) result = defaultCase(theEObject);

+				return result;

+			}

+			case PhantomsPackage.TOP_PARENT: {

+				TopParent topParent = (TopParent)theEObject;

+				T result = caseTopParent(topParent);

+				if (result == null) result = caseRootChild(topParent);

+				if (result == null) result = defaultCase(theEObject);

+				return result;

+			}

+			case PhantomsPackage.MEDIUM: {

+				Medium medium = (Medium)theEObject;

+				T result = caseMedium(medium);

+				if (result == null) result = caseRootChild(medium);

+				if (result == null) result = defaultCase(theEObject);

+				return result;

+			}

+			case PhantomsPackage.TOP_CHILD: {

+				TopChild topChild = (TopChild)theEObject;

+				T result = caseTopChild(topChild);

+				if (result == null) result = defaultCase(theEObject);

+				return result;

+			}

+			case PhantomsPackage.MEDIUM_PARENT: {

+				MediumParent mediumParent = (MediumParent)theEObject;

+				T result = caseMediumParent(mediumParent);

+				if (result == null) result = defaultCase(theEObject);

+				return result;

+			}

+			case PhantomsPackage.MEDIUM_CHILD: {

+				MediumChild mediumChild = (MediumChild)theEObject;

+				T result = caseMediumChild(mediumChild);

+				if (result == null) result = defaultCase(theEObject);

+				return result;

+			}

+			default: return defaultCase(theEObject);

+		}

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>Root</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>Root</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)

+	 * @generated

+	 */

+	public T caseRoot(Root object) {

+		return null;

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>Root Child</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>Root Child</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)

+	 * @generated

+	 */

+	public T caseRootChild(RootChild object) {

+		return null;

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>Top Parent</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>Top Parent</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)

+	 * @generated

+	 */

+	public T caseTopParent(TopParent object) {

+		return null;

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>Medium</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>Medium</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)

+	 * @generated

+	 */

+	public T caseMedium(Medium object) {

+		return null;

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>Top Child</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>Top Child</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)

+	 * @generated

+	 */

+	public T caseTopChild(TopChild object) {

+		return null;

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>Medium Parent</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>Medium Parent</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)

+	 * @generated

+	 */

+	public T caseMediumParent(MediumParent object) {

+		return null;

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>Medium Child</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>Medium Child</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)

+	 * @generated

+	 */

+	public T caseMediumChild(MediumChild object) {

+		return null;

+	}

+

+	/**

+	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.

+	 * <!-- begin-user-doc -->

+	 * This implementation returns null;

+	 * returning a non-null result will terminate the switch, but this is the last case anyway.

+	 * <!-- end-user-doc -->

+	 * @param object the target of the switch.

+	 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.

+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject)

+	 * @generated

+	 */

+	@Override

+	public T defaultCase(EObject object) {

+		return null;

+	}

+

+} //PhantomsSwitch

diff --git a/test-examples/phantoms/pom.xml b/test-examples/phantoms/pom.xml
new file mode 100755
index 0000000..7650485
--- /dev/null
+++ b/test-examples/phantoms/pom.xml
@@ -0,0 +1,27 @@
+<!--
+ * Copyright (c) 2013 Montages AG
+ *  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
+ *  
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.eclipse.gmf-tooling</groupId>
+  <artifactId>phantoms-example</artifactId>
+  <packaging>pom</packaging>
+  <version>1.0.0-SNAPSHOT</version>
+
+  
+  <parent>
+  	<groupId>org.eclipse.gmf-tooling</groupId>
+	<artifactId>test-examples</artifactId>
+	<version>1.0.0-SNAPSHOT</version>
+	<relativePath>../</relativePath>
+  </parent>
+  
+  <modules>
+		<module>org.eclipse.gmf.tooling.examples.phantoms</module>
+  </modules>
+</project>
diff --git a/test-examples/pom.xml b/test-examples/pom.xml
index b69dfd5..aa1711a 100644
--- a/test-examples/pom.xml
+++ b/test-examples/pom.xml
@@ -32,6 +32,7 @@
 		<module>svg</module>
 		<module>link_labels</module>
 		<module>linklf</module>
+		<module>phantoms</module>
 	</modules>
 	
 </project>
diff --git a/tests/org.eclipse.gmf.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.gmf.tests/META-INF/MANIFEST.MF
index fd70344..164c171 100644
--- a/tests/org.eclipse.gmf.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.gmf.tests/META-INF/MANIFEST.MF
@@ -44,7 +44,8 @@
  org.eclipse.gmf.runtime.lite.svg,
  org.eclipse.gmf.tooling.examples.border.custom,
  org.eclipse.gmf.tooling.examples.labels,
- org.eclipse.gmf.tooling.examples.linklabels
+ org.eclipse.gmf.tooling.examples.linklabels,
+ org.eclipse.gmf.tooling.examples.phantoms
 Bundle-Activator: org.eclipse.gmf.tests.Plugin
 Bundle-ActivationPolicy: lazy
 Export-Package: org.eclipse.gmf.tests;x-friends:="org.eclipse.gmf.tests.lite,org.eclipse.gmf.tooling.tests.xtend",
diff --git a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/TestSamplesSuite.java b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/TestSamplesSuite.java
index 4594355..77c5ab1 100644
--- a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/TestSamplesSuite.java
+++ b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/TestSamplesSuite.java
@@ -7,25 +7,30 @@
 import org.eclipse.gmf.tests.samples.CompartmentsSampleTest;
 import org.eclipse.gmf.tests.samples.LabelsSampleTest;
 import org.eclipse.gmf.tests.samples.LinkLabelsTest;
+import org.eclipse.gmf.tests.samples.LinklfSampleTest;
 import org.eclipse.gmf.tests.samples.LinksSampleTest;
+import org.eclipse.gmf.tests.samples.PhantomSampleTest;
 import org.eclipse.gmf.tests.samples.PinsSampleTest;
 import org.eclipse.gmf.tests.samples.SVGSampleTest;
 import org.eclipse.gmf.tests.samples.ShourtcutSampleTest;
 
+
 public class TestSamplesSuite {
 
-	public static Test suite() {
-		TestSuite suite = new TestSuite("Tests for org.eclipse.gmf samples");
-		suite.addTestSuite(PinsSampleTest.class);
-		suite.addTestSuite(CompartmentsSampleTest.class);
-		suite.addTestSuite(LinksSampleTest.class);
-		suite.addTestSuite(SVGSampleTest.class);
-		suite.addTestSuite(ShourtcutSampleTest.class);
-		suite.addTestSuite(AffixedSampleTest.class);
-		suite.addTestSuite(LabelsSampleTest.class);
-		//suite.addTestSuite(BorderSampleTest.class);
-		suite.addTestSuite(LinkLabelsTest.class);
-		return suite;
-	}
+  public static Test suite() {
+    TestSuite suite = new TestSuite("Tests for org.eclipse.gmf samples");
+    suite.addTestSuite(PinsSampleTest.class);
+    suite.addTestSuite(CompartmentsSampleTest.class);
+    suite.addTestSuite(LinksSampleTest.class);
+    suite.addTestSuite(SVGSampleTest.class);
+    suite.addTestSuite(ShourtcutSampleTest.class);
+    suite.addTestSuite(AffixedSampleTest.class);
+    suite.addTestSuite(LabelsSampleTest.class);
+    // suite.addTestSuite(BorderSampleTest.class);
+    suite.addTestSuite(LinkLabelsTest.class);
+    suite.addTestSuite(LinklfSampleTest.class);
+    suite.addTestSuite(PhantomSampleTest.class);
+    return suite;
+  }
 
 }
diff --git a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/samples/PhantomSampleTest.java b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/samples/PhantomSampleTest.java
new file mode 100644
index 0000000..808fc09
--- /dev/null
+++ b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/samples/PhantomSampleTest.java
@@ -0,0 +1,22 @@
+package org.eclipse.gmf.tests.samples;

+

+import org.eclipse.gmf.tests.setup.RuntimeBasedGeneratorConfiguration;

+

+public class PhantomSampleTest extends BaseSampleTest {

+

+	public static final String GIT_GMFGEN_PATH = "platform:/plugin/org.eclipse.gmf.tooling.examples.phantoms/model/phantoms.gmfgen"; 

+

+	public PhantomSampleTest(String name) {

+		this(name, new RuntimeBasedGeneratorConfiguration());

+	}

+	

+	public PhantomSampleTest(String name, RuntimeBasedGeneratorConfiguration genCongif) {

+		super(name, genCongif);

+	}

+	

+	@Override

+	protected String getRelativeGMFGENPath() {

+		return GIT_GMFGEN_PATH;

+	}

+	

+}

diff --git a/tests/org.eclipse.gmf.tooling.tests.xtend/META-INF/MANIFEST.MF b/tests/org.eclipse.gmf.tooling.tests.xtend/META-INF/MANIFEST.MF
index 99e93c1..7f61b8c 100644
--- a/tests/org.eclipse.gmf.tooling.tests.xtend/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.gmf.tooling.tests.xtend/META-INF/MANIFEST.MF
@@ -50,7 +50,8 @@
  org.eclipse.gmf.runtime.lite.svg,
  org.eclipse.gmf.tooling.examples.border.custom,
  org.eclipse.gmf.tooling.examples.labels,
- org.eclipse.gmf.tooling.examples.linklabels
+ org.eclipse.gmf.tooling.examples.linklabels,
+ org.eclipse.gmf.tooling.examples.phantoms
 Bundle-Activator: org.eclipse.gmf.tooling.tests.xtend.XtendsTestPluginActivator
 Bundle-ActivationPolicy: lazy
 Export-Package: edithelpers,
diff --git a/tests/org.eclipse.gmf.tooling.tests.xtend/src/org/eclipse/gmf/tooling/tests/xtend/TestSamplesSuiteXtend.java b/tests/org.eclipse.gmf.tooling.tests.xtend/src/org/eclipse/gmf/tooling/tests/xtend/TestSamplesSuiteXtend.java
index b01c700..65e5dc7 100644
--- a/tests/org.eclipse.gmf.tooling.tests.xtend/src/org/eclipse/gmf/tooling/tests/xtend/TestSamplesSuiteXtend.java
+++ b/tests/org.eclipse.gmf.tooling.tests.xtend/src/org/eclipse/gmf/tooling/tests/xtend/TestSamplesSuiteXtend.java
@@ -7,24 +7,28 @@
 import org.eclipse.gmf.tooling.tests.xtend.samples.CompartmentsSampleTestXtend;
 import org.eclipse.gmf.tooling.tests.xtend.samples.LabelsSampleTestXtend;
 import org.eclipse.gmf.tooling.tests.xtend.samples.LinkLabelsTestXtend;
+import org.eclipse.gmf.tooling.tests.xtend.samples.LinklfSampleTestXtend;
 import org.eclipse.gmf.tooling.tests.xtend.samples.LinksSampleTestXtend;
+import org.eclipse.gmf.tooling.tests.xtend.samples.PhantomSampleTestXtend;
 import org.eclipse.gmf.tooling.tests.xtend.samples.PinsSampleTestXtend;
 import org.eclipse.gmf.tooling.tests.xtend.samples.SVGSampleTestXtend;
 import org.eclipse.gmf.tooling.tests.xtend.samples.ShourtcutSampleTestXtend;
 
 
 public class TestSamplesSuiteXtend {
-	public static Test suite() {
-		TestSuite suite = new TestSuite("Tests for org.eclipse.tooling.gmf samples");
-		suite.addTestSuite(PinsSampleTestXtend.class);
-		suite.addTestSuite(CompartmentsSampleTestXtend.class);
-		suite.addTestSuite(LinksSampleTestXtend.class);
-		suite.addTestSuite(LinksSampleTestXtend.class);
-		suite.addTestSuite(SVGSampleTestXtend.class);
-		suite.addTestSuite(ShourtcutSampleTestXtend.class);
-		suite.addTestSuite(AffixedSampleTestXtend.class);
-		suite.addTestSuite(LabelsSampleTestXtend.class);
-		suite.addTestSuite(LinkLabelsTestXtend.class);
-		return suite;
-	}
+  public static Test suite() {
+    TestSuite suite = new TestSuite("Tests for org.eclipse.tooling.gmf samples");
+    suite.addTestSuite(PinsSampleTestXtend.class);
+    suite.addTestSuite(CompartmentsSampleTestXtend.class);
+    suite.addTestSuite(LinksSampleTestXtend.class);
+    suite.addTestSuite(LinksSampleTestXtend.class);
+    suite.addTestSuite(SVGSampleTestXtend.class);
+    suite.addTestSuite(ShourtcutSampleTestXtend.class);
+    suite.addTestSuite(AffixedSampleTestXtend.class);
+    suite.addTestSuite(LabelsSampleTestXtend.class);
+    suite.addTestSuite(LinkLabelsTestXtend.class);
+    suite.addTestSuite(PhantomSampleTestXtend.class);
+    suite.addTestSuite(LinklfSampleTestXtend.class);
+    return suite;
+  }
 }
diff --git a/tests/org.eclipse.gmf.tooling.tests.xtend/src/org/eclipse/gmf/tooling/tests/xtend/samples/PhantomSampleTestXtend.java b/tests/org.eclipse.gmf.tooling.tests.xtend/src/org/eclipse/gmf/tooling/tests/xtend/samples/PhantomSampleTestXtend.java
new file mode 100644
index 0000000..0fd5b6f
--- /dev/null
+++ b/tests/org.eclipse.gmf.tooling.tests.xtend/src/org/eclipse/gmf/tooling/tests/xtend/samples/PhantomSampleTestXtend.java
@@ -0,0 +1,12 @@
+package org.eclipse.gmf.tooling.tests.xtend.samples;

+

+import org.eclipse.gmf.tests.samples.PhantomSampleTest;

+import org.eclipse.gmf.tooling.tests.xtend.setup.RuntimeBasedGeneratorConfigurationXtend;

+

+public class PhantomSampleTestXtend extends PhantomSampleTest {

+

+	public PhantomSampleTestXtend(String name) {

+		super(name, new RuntimeBasedGeneratorConfigurationXtend());

+	}

+	

+}