initial commit

diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/.classpath b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/.classpath
new file mode 100644
index 0000000..bb091d7
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<classpath>

+	<classpathentry kind="src" path="generated"/>

+	<classpathentry kind="src" path="src"/>

+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>

+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

+	<classpathentry kind="output" path="bin"/>

+</classpath>

diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/.project b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/.project
new file mode 100644
index 0000000..049397b
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<projectDescription>

+	<name>org.eclipse.egf.usecase.pattern.uc2</name>

+	<comment></comment>

+	<projects>

+	</projects>

+	<buildSpec>

+		<buildCommand>

+			<name>org.eclipse.egf.pattern.ui.PatternBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.jdt.core.javabuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.pde.ManifestBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+		<buildCommand>

+			<name>org.eclipse.pde.SchemaBuilder</name>

+			<arguments>

+			</arguments>

+		</buildCommand>

+	</buildSpec>

+	<natures>

+		<nature>org.eclipse.pde.PluginNature</nature>

+		<nature>org.eclipse.jdt.core.javanature</nature>

+		<nature>org.eclipse.egf.core.EGFNature</nature>

+	</natures>

+</projectDescription>

diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/.settings/org.eclipse.jdt.core.prefs b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..9b68a23
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu May 06 17:36:35 CEST 2010

+eclipse.preferences.version=1

+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled

+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5

+org.eclipse.jdt.core.compiler.compliance=1.5

+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error

+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error

+org.eclipse.jdt.core.compiler.source=1.5

diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/META-INF/MANIFEST.MF b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..18e8c04
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.usecase.pattern.uc2;singleton:=true
+Bundle-Version: 0.2.4.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: 
+ org.eclipse.egf.pattern;visibility:=reexport,
+ org.eclipse.egf.pattern.ftask;visibility:=reexport
+Export-Package: 
+ egf.uc2_1.main,
+ egf.uc2_2.substitution.merge,
+ egf.uc2_1.substitution.single
+Bundle-ActivationPolicy: lazy
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/about.html b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>

+

+

+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

+<title>About</title>

+</head><body lang="EN-US">

+<h2>About This Content</h2>

+ 

+<p>June 5, 2007</p>	

+<h3>License</h3>

+

+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 

+indicated below, the Content is provided to you under the terms and conditions of the

+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 

+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.

+For purposes of the EPL, "Program" will mean the Content.</p>

+

+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

+being redistributed by another party ("Redistributor") and different terms and conditions may

+apply to your use of any object code in the Content.  Check the Redistributor's license that was 

+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

+indicated below, the terms and conditions of the EPL still apply to any source code in the Content

+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

+

+</body></html>
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/build.properties b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/build.properties
new file mode 100644
index 0000000..70a9f5c
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/build.properties
@@ -0,0 +1,23 @@
+

+##

+#  Copyright (c) 2009-2010 Thales Corporate Services S.A.S.

+#  All rights reserved. This program and the accompanying materials

+#  are made available under the terms of the Eclipse Public License v1.0

+#  which accompanies this distribution, and is available at

+#  http://www.eclipse.org/legal/epl-v10.html

+# 

+#  Contributors:

+#      Thales Corporate Services S.A.S - initial API and implementation

+##

+

+output.. = bin/

+bin.includes = META-INF/,\

+               .,\

+               plugin.properties,\

+               egf/,\

+               plugin.xml,\

+               about.html,\

+               templates/

+source.. = generated/,\

+           src/

+src.includes = about.html

diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/egf/Pattern_UC2_1_SinglePatternSubstitution.fcore b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/egf/Pattern_UC2_1_SinglePatternSubstitution.fcore
new file mode 100644
index 0000000..7bc90aa
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/egf/Pattern_UC2_1_SinglePatternSubstitution.fcore
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<xmi:XMI xmi:version="2.0"

+    xmlns:xmi="http://www.omg.org/XMI" xmlns:domain="http://www.eclipse.org/egf/1.0.0/domain"

+    xmlns:fcore="http://www.eclipse.org/egf/1.0.0/fcore" xmlns:fprod="http://www.eclipse.org/egf/1.0.0/fprod"

+    xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask" xmlns:jetpattern="http://www.eclipse.org/egf/1.0.0/jetpattern"

+    xmlns:pattern="http://www.eclipse.org/egf/1.0.0/pattern">

+  <fcore:FactoryComponent xmi:id="_9tinYVklEd-JQcaBMLZCWg" name="Pattern_UC2_1_Main">

+    <contractContainer xmi:id="_9rXyQVknEd-nZ9GSBuVMNQ">

+      <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_9rXyQlknEd-nZ9GSBuVMNQ"

+          name="domain" mandatory="true" invocationContracts="#_oREaklksEd-nZ9GSBuVMNQ">

+        <type xmi:type="domain:TypeDomainURI" xmi:id="_9rXyQ1knEd-nZ9GSBuVMNQ"/>

+      </contracts>

+      <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_9rXyRFknEd-nZ9GSBuVMNQ"

+          name="pattern.substitutions" invocationContracts="#_oREal1ksEd-nZ9GSBuVMNQ">

+        <type xmi:type="pattern:TypePatternSubstitution" xmi:id="_9rXyRVknEd-nZ9GSBuVMNQ"/>

+      </contracts>

+    </contractContainer>

+    <viewpointContainer xmi:id="_MqjuYFkoEd-nZ9GSBuVMNQ">

+      <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_NXj-UFkoEd-nZ9GSBuVMNQ">

+        <libraries xmi:id="_YZR_UFkoEd-nZ9GSBuVMNQ" name="egf.uc2_1.main">

+          <elements xmi:type="pattern:Pattern" xmi:id="_gA2NoFkoEd-nZ9GSBuVMNQ" name="uc2_1_ClassPattern"

+              headerMethod="#_gA2NoVkoEd-nZ9GSBuVMNQ" footerMethod="#_gA2NpFkoEd-nZ9GSBuVMNQ"

+              initMethod="#_gA2NolkoEd-nZ9GSBuVMNQ">

+            <methods xmi:id="_gA2NoVkoEd-nZ9GSBuVMNQ" name="header" patternFilePath="templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2NoVkoEd-nZ9GSBuVMNQ.pt"/>

+            <methods xmi:id="_gA2NolkoEd-nZ9GSBuVMNQ" name="init" patternFilePath="templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2NolkoEd-nZ9GSBuVMNQ.pt"/>

+            <methods xmi:id="_gA2NpFkoEd-nZ9GSBuVMNQ" name="footer" patternFilePath="templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2NpFkoEd-nZ9GSBuVMNQ.pt"/>

+            <methods xmi:id="_K_KHEFkpEd-nZ9GSBuVMNQ" name="body" patternFilePath="templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._K_KHEFkpEd-nZ9GSBuVMNQ.pt"/>

+            <orchestration xmi:type="pattern:MethodCall" xmi:id="_dnJhYFnjEd-nZ9GSBuVMNQ"

+                called="#_K_KHEFkpEd-nZ9GSBuVMNQ"/>

+            <parameters xmi:id="_2xSfkFkoEd-nZ9GSBuVMNQ" name="aClass" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>

+            <nature xmi:type="jetpattern:JetNature" xmi:id="_gA2NplkoEd-nZ9GSBuVMNQ"

+                name="JET"/>

+          </elements>

+          <elements xmi:type="pattern:Pattern" xmi:id="_KAoXYFkrEd-nZ9GSBuVMNQ" name="uc2_1_AttributePattern"

+              headerMethod="#_KAoXYVkrEd-nZ9GSBuVMNQ" footerMethod="#_KAoXZFkrEd-nZ9GSBuVMNQ"

+              initMethod="#_KAoXYlkrEd-nZ9GSBuVMNQ">

+            <methods xmi:id="_KAoXYVkrEd-nZ9GSBuVMNQ" name="header" patternFilePath="templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXYVkrEd-nZ9GSBuVMNQ.pt"/>

+            <methods xmi:id="_KAoXYlkrEd-nZ9GSBuVMNQ" name="init" patternFilePath="templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXYlkrEd-nZ9GSBuVMNQ.pt"/>

+            <methods xmi:id="_KAoXY1krEd-nZ9GSBuVMNQ" name="body" patternFilePath="templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXY1krEd-nZ9GSBuVMNQ.pt"/>

+            <methods xmi:id="_KAoXZFkrEd-nZ9GSBuVMNQ" name="footer" patternFilePath="templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXZFkrEd-nZ9GSBuVMNQ.pt"/>

+            <orchestration xmi:type="pattern:SuperCall" xmi:id="_KAoXZVkrEd-nZ9GSBuVMNQ"/>

+            <orchestration xmi:type="pattern:MethodCall" xmi:id="_Y3VF4FkrEd-nZ9GSBuVMNQ"

+                called="#_KAoXY1krEd-nZ9GSBuVMNQ"/>

+            <parameters xmi:id="_N6OfIFkrEd-nZ9GSBuVMNQ" name="anAttribute" type="http://www.eclipse.org/emf/2002/Ecore#//EAttribute"/>

+            <nature xmi:type="jetpattern:JetNature" xmi:id="_KAoXZlkrEd-nZ9GSBuVMNQ"

+                name="JET"/>

+          </elements>

+        </libraries>

+      </viewpoints>

+    </viewpointContainer>

+    <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_l-SfoFksEd-nZ9GSBuVMNQ">

+      <invocations xmi:id="_oREakFksEd-nZ9GSBuVMNQ" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_8FZ3aof6eEd64XYPo3s6sPg">

+        <invocationContractContainer xmi:id="_oREakVksEd-nZ9GSBuVMNQ">

+          <invocationContracts xmi:id="_oREaklksEd-nZ9GSBuVMNQ" factoryComponentContract="#_9rXyQlknEd-nZ9GSBuVMNQ"

+              invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_DgB2IP6fEd64XaYPo3s6sPg"/>

+          <invocationContracts xmi:id="_oREallksEd-nZ9GSBuVMNQ" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_nz1HkSCaEd-Sse0r9LJWbA">

+            <type xmi:type="pattern:TypePatternList" xmi:id="_9B9PkFksEd-nZ9GSBuVMNQ"

+                elements="#_gA2NoFkoEd-nZ9GSBuVMNQ #_KAoXYFkrEd-nZ9GSBuVMNQ"/>

+          </invocationContracts>

+          <invocationContracts xmi:id="_oREal1ksEd-nZ9GSBuVMNQ" factoryComponentContract="#_9rXyRFknEd-nZ9GSBuVMNQ"

+              invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_NFhJ4UMgEd-Ixul1H5ANhg"/>

+        </invocationContractContainer>

+      </invocations>

+    </orchestration>

+  </fcore:FactoryComponent>

+  <fcore:FactoryComponent xmi:id="_JyrwEFktEd-nZ9GSBuVMNQ" name="Pattern_UC2_1_SimpleCall">

+    <viewpointContainer xmi:id="_jwKlwFktEd-nZ9GSBuVMNQ">

+      <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_kc36wFktEd-nZ9GSBuVMNQ">

+        <domains xmi:type="domain:DomainURI" xmi:id="_lXbegFktEd-nZ9GSBuVMNQ" uri="platform:/plugin/org.eclipse.egf.model/model/Fcore.ecore"/>

+      </viewpoints>

+    </viewpointContainer>

+    <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_FqYBcFkuEd-nZ9GSBuVMNQ">

+      <invocations xmi:id="_KDZ3MFkuEd-nZ9GSBuVMNQ" invokedActivity="#_9tinYVklEd-JQcaBMLZCWg">

+        <invocationContractContainer xmi:id="_KDZ3MVkuEd-nZ9GSBuVMNQ">

+          <invocationContracts xmi:id="_KDZ3MlkuEd-nZ9GSBuVMNQ" invokedContract="#_9rXyQlknEd-nZ9GSBuVMNQ">

+            <type xmi:type="domain:TypeDomainURI" xmi:id="_L2lsEFkuEd-nZ9GSBuVMNQ"

+                domain="#_lXbegFktEd-nZ9GSBuVMNQ"/>

+          </invocationContracts>

+        </invocationContractContainer>

+      </invocations>

+    </orchestration>

+  </fcore:FactoryComponent>

+  <fcore:FactoryComponent xmi:id="_ujei0FnnEd-nCN8bxVd2Rg" name="Pattern_UC2_1_SinglePatternSubstitution">

+    <viewpointContainer xmi:id="_GjMrUFnoEd-nCN8bxVd2Rg">

+      <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_OtVbMFnoEd-nCN8bxVd2Rg">

+        <domains xmi:type="domain:DomainURI" xmi:id="_OtVbMVnoEd-nCN8bxVd2Rg" uri="platform:/plugin/org.eclipse.egf.model/model/Fcore.ecore"/>

+      </viewpoints>

+      <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_RvVzoFnoEd-nCN8bxVd2Rg">

+        <libraries xmi:id="_9EAXkFnoEd-nCN8bxVd2Rg" name="egf.uc2_1.substitution.single">

+          <elements xmi:type="pattern:Pattern" xmi:id="_BhzYkFnpEd-nCN8bxVd2Rg" name="uc2_1_AttributePatternSubstitution1"

+              headerMethod="#_BhzYkVnpEd-nCN8bxVd2Rg" footerMethod="#_BhzYlFnpEd-nCN8bxVd2Rg"

+              initMethod="#_BhzYklnpEd-nCN8bxVd2Rg">

+            <methods xmi:id="_BhzYkVnpEd-nCN8bxVd2Rg" name="header" patternFilePath="templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYkVnpEd-nCN8bxVd2Rg.pt"/>

+            <methods xmi:id="_BhzYklnpEd-nCN8bxVd2Rg" name="init" patternFilePath="templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYklnpEd-nCN8bxVd2Rg.pt"/>

+            <methods xmi:id="_BhzYk1npEd-nCN8bxVd2Rg" name="body" patternFilePath="templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYk1npEd-nCN8bxVd2Rg.pt"/>

+            <methods xmi:id="_BhzYlFnpEd-nCN8bxVd2Rg" name="footer" patternFilePath="templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYlFnpEd-nCN8bxVd2Rg.pt"/>

+            <orchestration xmi:type="pattern:SuperCall" xmi:id="_BhzYlVnpEd-nCN8bxVd2Rg"/>

+            <orchestration xmi:type="pattern:MethodCall" xmi:id="_InlTAFnqEd-nCN8bxVd2Rg"

+                called="#_BhzYk1npEd-nCN8bxVd2Rg"/>

+            <parameters xmi:id="_eDWGcFnpEd-nCN8bxVd2Rg" name="anAttribute" type="http://www.eclipse.org/emf/2002/Ecore#//EAttribute"/>

+            <nature xmi:type="jetpattern:JetNature" xmi:id="_BhzYllnpEd-nCN8bxVd2Rg"

+                name="JET"/>

+          </elements>

+        </libraries>

+      </viewpoints>

+    </viewpointContainer>

+    <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_rJ1bkFnpEd-nCN8bxVd2Rg">

+      <invocations xmi:id="_vik9cFnpEd-nCN8bxVd2Rg" invokedActivity="#_9tinYVklEd-JQcaBMLZCWg">

+        <invocationContractContainer xmi:id="_vik9cVnpEd-nCN8bxVd2Rg">

+          <invocationContracts xmi:id="_vik9clnpEd-nCN8bxVd2Rg" invokedContract="#_9rXyQlknEd-nZ9GSBuVMNQ">

+            <type xmi:type="domain:TypeDomainURI" xmi:id="_zjU2EFnpEd-nCN8bxVd2Rg"

+                domain="#_OtVbMVnoEd-nCN8bxVd2Rg"/>

+          </invocationContracts>

+          <invocationContracts xmi:id="_vik9c1npEd-nCN8bxVd2Rg" invokedContract="#_9rXyRFknEd-nZ9GSBuVMNQ">

+            <type xmi:type="pattern:TypePatternSubstitution" xmi:id="_3CY98FnpEd-nCN8bxVd2Rg">

+              <substitutions xmi:id="_4LQqgFnpEd-nCN8bxVd2Rg" outgoing="#_KAoXYFkrEd-nZ9GSBuVMNQ"

+                  incoming="#_BhzYkFnpEd-nCN8bxVd2Rg"/>

+            </type>

+          </invocationContracts>

+        </invocationContractContainer>

+      </invocations>

+    </orchestration>

+  </fcore:FactoryComponent>

+</xmi:XMI>

diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/egf/Pattern_UC2_2_MergingPatternSubstitution.fcore b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/egf/Pattern_UC2_2_MergingPatternSubstitution.fcore
new file mode 100644
index 0000000..ba521f0
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/egf/Pattern_UC2_2_MergingPatternSubstitution.fcore
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<fcore:FactoryComponent xmi:version="2.0"

+    xmlns:xmi="http://www.omg.org/XMI" xmlns:domain="http://www.eclipse.org/egf/1.0.0/domain"

+    xmlns:fcore="http://www.eclipse.org/egf/1.0.0/fcore" xmlns:fprod="http://www.eclipse.org/egf/1.0.0/fprod"

+    xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask" xmlns:jetpattern="http://www.eclipse.org/egf/1.0.0/jetpattern"

+    xmlns:pattern="http://www.eclipse.org/egf/1.0.0/pattern" xmi:id="_A4BGoVnnEd-nCN8bxVd2Rg"

+    name="Pattern_UC2_2_MergingPatternSubstitution">

+  <contractContainer xmi:id="_1U-uAFn2Ed-yhOrMHI1JRQ">

+    <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_1571MFn2Ed-yhOrMHI1JRQ"

+        name="pattern.substitutions">

+      <type xmi:type="pattern:TypePatternSubstitution" xmi:id="_1571MVn2Ed-yhOrMHI1JRQ"/>

+    </contracts>

+  </contractContainer>

+  <viewpointContainer xmi:id="_zaxPoFnsEd-nCN8bxVd2Rg">

+    <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_znbyoFnsEd-nCN8bxVd2Rg">

+      <domains xmi:type="domain:DomainURI" xmi:id="_znbyoVnsEd-nCN8bxVd2Rg" uri="platform:/plugin/org.eclipse.egf.model/model/Fcore.ecore"/>

+    </viewpoints>

+    <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_0lR68FnsEd-nCN8bxVd2Rg">

+      <libraries xmi:id="_-nql4FnsEd-nCN8bxVd2Rg" name="egf.uc2_2.substitution.merge">

+        <elements xmi:type="pattern:Pattern" xmi:id="_ED6MIFntEd-nCN8bxVd2Rg" name="uc2_2_AttributePatternSubstitution2"

+            headerMethod="#_ED6MIVntEd-nCN8bxVd2Rg" footerMethod="#_ED6MJFntEd-nCN8bxVd2Rg"

+            initMethod="#_ED6MIlntEd-nCN8bxVd2Rg">

+          <methods xmi:id="_ED6MIVntEd-nCN8bxVd2Rg" name="header" patternFilePath="templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MIVntEd-nCN8bxVd2Rg.pt"/>

+          <methods xmi:id="_ED6MIlntEd-nCN8bxVd2Rg" name="init" patternFilePath="templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MIlntEd-nCN8bxVd2Rg.pt"/>

+          <methods xmi:id="_ED6MI1ntEd-nCN8bxVd2Rg" name="body" patternFilePath="templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MI1ntEd-nCN8bxVd2Rg.pt"/>

+          <methods xmi:id="_ED6MJFntEd-nCN8bxVd2Rg" name="footer" patternFilePath="templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MJFntEd-nCN8bxVd2Rg.pt"/>

+          <orchestration xmi:type="pattern:SuperCall" xmi:id="_ED6MJVntEd-nCN8bxVd2Rg"/>

+          <orchestration xmi:type="pattern:MethodCall" xmi:id="_eQiJsFnwEd-yhOrMHI1JRQ"

+              called="#_ED6MI1ntEd-nCN8bxVd2Rg"/>

+          <parameters xmi:id="_HnJpYFntEd-nCN8bxVd2Rg" name="anAttribute" type="http://www.eclipse.org/emf/2002/Ecore#//EAttribute"/>

+          <nature xmi:type="jetpattern:JetNature" xmi:id="_ED6MJlntEd-nCN8bxVd2Rg"

+              name="JET"/>

+        </elements>

+        <elements xmi:type="pattern:Pattern" xmi:id="_6KKtkFnxEd-yhOrMHI1JRQ" name="uc2_2_ClassPatternSubstitution2"

+            headerMethod="#_6KKtkVnxEd-yhOrMHI1JRQ" footerMethod="#_6KKtlFnxEd-yhOrMHI1JRQ"

+            initMethod="#_6KKtklnxEd-yhOrMHI1JRQ">

+          <methods xmi:id="_6KKtkVnxEd-yhOrMHI1JRQ" name="header" patternFilePath="templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtkVnxEd-yhOrMHI1JRQ.pt"/>

+          <methods xmi:id="_6KKtklnxEd-yhOrMHI1JRQ" name="init" patternFilePath="templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtklnxEd-yhOrMHI1JRQ.pt"/>

+          <methods xmi:id="_6KKtk1nxEd-yhOrMHI1JRQ" name="body" patternFilePath="templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtk1nxEd-yhOrMHI1JRQ.pt"/>

+          <methods xmi:id="_6KKtlFnxEd-yhOrMHI1JRQ" name="footer" patternFilePath="templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtlFnxEd-yhOrMHI1JRQ.pt"/>

+          <orchestration xmi:type="pattern:SuperCall" xmi:id="_6KKtlVnxEd-yhOrMHI1JRQ"/>

+          <orchestration xmi:type="pattern:MethodCall" xmi:id="_K7ptwFnyEd-yhOrMHI1JRQ"

+              called="#_6KKtk1nxEd-yhOrMHI1JRQ"/>

+          <parameters xmi:id="_BAj9oFnyEd-yhOrMHI1JRQ" name="aClass" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>

+          <nature xmi:type="jetpattern:JetNature" xmi:id="_6KKtllnxEd-yhOrMHI1JRQ"

+              name="JET"/>

+        </elements>

+      </libraries>

+    </viewpoints>

+  </viewpointContainer>

+  <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_SFQnAFntEd-nCN8bxVd2Rg">

+    <invocations xmi:id="_bxxTIVnuEd-yhOrMHI1JRQ" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/merge_substitutions.fcore#_N9g3oElcEd-TSsH7K-_bxQ">

+      <invocationContractContainer xmi:id="_bxxTIlnuEd-yhOrMHI1JRQ">

+        <invocationContracts xmi:id="_bxxTI1nuEd-yhOrMHI1JRQ" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/merge_substitutions.fcore#_UVURwEldEd-TSsH7K-_bxQ">

+          <type xmi:type="pattern:TypePatternSubstitution" xmi:id="_9BzwcFnuEd-yhOrMHI1JRQ">

+            <substitutions xmi:id="_92tYIFnuEd-yhOrMHI1JRQ" outgoing="platform:/plugin/org.eclipse.egf.usecase.pattern.uc2/egf/Pattern_UC2_1_SinglePatternSubstitution.fcore#_KAoXYFkrEd-nZ9GSBuVMNQ"

+                incoming="platform:/plugin/org.eclipse.egf.usecase.pattern.uc2/egf/Pattern_UC2_1_SinglePatternSubstitution.fcore#_BhzYkFnpEd-nCN8bxVd2Rg #_ED6MIFntEd-nCN8bxVd2Rg"/>

+          </type>

+        </invocationContracts>

+        <invocationContracts xmi:id="_bxxTJFnuEd-yhOrMHI1JRQ" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/merge_substitutions.fcore#_ahgHMEldEd-TSsH7K-_bxQ">

+          <type xmi:type="pattern:TypePatternSubstitution" xmi:id="_mB5psFnvEd-yhOrMHI1JRQ">

+            <substitutions xmi:id="_okxPEFnvEd-yhOrMHI1JRQ" outgoing="platform:/plugin/org.eclipse.egf.usecase.pattern.uc2/egf/Pattern_UC2_1_SinglePatternSubstitution.fcore#_gA2NoFkoEd-nZ9GSBuVMNQ"

+                incoming="#_6KKtkFnxEd-yhOrMHI1JRQ"/>

+          </type>

+        </invocationContracts>

+        <invocationContracts xmi:id="_bxxTJVnuEd-yhOrMHI1JRQ" targetInvocationContract="#_QfRZQ1nwEd-yhOrMHI1JRQ"

+            invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/merge_substitutions.fcore#_gBdIwEldEd-TSsH7K-_bxQ"/>

+      </invocationContractContainer>

+    </invocations>

+    <invocations xmi:id="_QfRZQFnwEd-yhOrMHI1JRQ" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.usecase.pattern.uc2/egf/Pattern_UC2_1_SinglePatternSubstitution.fcore#_9tinYVklEd-JQcaBMLZCWg">

+      <invocationContractContainer xmi:id="_QfRZQVnwEd-yhOrMHI1JRQ">

+        <invocationContracts xmi:id="_QfRZQlnwEd-yhOrMHI1JRQ" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.usecase.pattern.uc2/egf/Pattern_UC2_1_SinglePatternSubstitution.fcore#_9rXyQlknEd-nZ9GSBuVMNQ">

+          <type xmi:type="domain:TypeDomainURI" xmi:id="_UILZoFnwEd-yhOrMHI1JRQ" domain="#_znbyoVnsEd-nCN8bxVd2Rg"/>

+        </invocationContracts>

+        <invocationContracts xmi:id="_QfRZQ1nwEd-yhOrMHI1JRQ" sourceInvocationContract="#_bxxTJVnuEd-yhOrMHI1JRQ"

+            invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.usecase.pattern.uc2/egf/Pattern_UC2_1_SinglePatternSubstitution.fcore#_9rXyRFknEd-nZ9GSBuVMNQ"/>

+      </invocationContractContainer>

+    </invocations>

+  </orchestration>

+</fcore:FactoryComponent>

diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_1/main/uc2_1_AttributePattern.java b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_1/main/uc2_1_AttributePattern.java
new file mode 100644
index 0000000..51d8a1d
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_1/main/uc2_1_AttributePattern.java
@@ -0,0 +1,101 @@
+package egf.uc2_1.main;

+

+import org.eclipse.egf.common.helper.*;

+import java.util.*;

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

+import org.eclipse.egf.model.pattern.*;

+import org.eclipse.egf.pattern.execution.*;

+import org.eclipse.egf.pattern.query.*;

+

+public class uc2_1_AttributePattern 

+{

+  protected static String nl;

+  public static synchronized uc2_1_AttributePattern create(String lineSeparator)

+  {

+    nl = lineSeparator;

+    uc2_1_AttributePattern result = new uc2_1_AttributePattern();

+    nl = null;

+    return result;

+  }

+

+  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;

+  protected final String TEXT_1 = "Main:";

+  protected final String TEXT_2 = "_attribute ";

+  protected final String TEXT_3 = NL;

+  protected final String TEXT_4 = NL;

+

+	public uc2_1_AttributePattern()

+	{

+	//Here is the constructor
+StringBuffer stringBuffer = new StringBuffer();
+

+    // add initialisation of the pattern variables (declaration has been already done).

+    

+	}

+  	

+  	public String generate(Object argument) throws Exception

+  {

+    final StringBuffer stringBuffer = new StringBuffer();

+    

+    InternalPatternContext ctx = (InternalPatternContext)argument;

+Map<String, String> queryCtx = null;

+IQuery.ParameterDescription paramDesc = null;

+

+    

+List<Object> anAttributeList = null;

+//this pattern can only be called by another (i.e. it's not an entry point in execution)

+

+

+for (Object anAttributeParameter : anAttributeList ) {

+

+this.anAttribute = (org.eclipse.emf.ecore.EAttribute)anAttributeParameter;

+

+

+    orchestration(ctx);

+    

+}

+if (ctx.useReporter()){

+    ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);

+    ctx.clearBuffer();

+}

+    

+    stringBuffer.append(TEXT_3);

+    stringBuffer.append(TEXT_4);

+    return stringBuffer.toString();

+  }

+public String orchestration(PatternContext ctx) throws Exception  {

+InternalPatternContext ictx = (InternalPatternContext)ctx;

+int executionIndex = ictx.getExecutionBuffer().length();

+

+    

+    

+method_body(ictx.getBuffer(), ictx);

+    

+String loop = ictx.getBuffer().toString();

+if (ictx.useReporter()){

+    ictx.getExecutionBuffer().append(ictx.getBuffer().substring(ictx.getExecutionCurrentIndex()));

+    ictx.setExecutionCurrentIndex(0);

+    Map<String, Object> parameterValues = new HashMap<String, Object>();

+    parameterValues.put("anAttribute", this.anAttribute);

+    String outputWithCallBack = ictx.getExecutionBuffer().substring(executionIndex);

+    ictx.getReporter().loopFinished(loop, outputWithCallBack, ictx, parameterValues);

+    ictx.clearBuffer();}

+return loop;

+} 

+

+protected org.eclipse.emf.ecore.EAttribute anAttribute = null;

+public void set_anAttribute(org.eclipse.emf.ecore.EAttribute object) {

+this.anAttribute = object;

+}

+public Map<String, Object> getParameters() {

+final Map<String, Object> parameters = new HashMap<String, Object>();

+parameters.put("anAttribute", this.anAttribute);

+return parameters; }

+

+    protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {

+

+    stringBuffer.append(TEXT_1);

+    stringBuffer.append(anAttribute.getName());

+    stringBuffer.append(TEXT_2);

+    }

+    }
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_1/main/uc2_1_ClassPattern.java b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_1/main/uc2_1_ClassPattern.java
new file mode 100644
index 0000000..7223b19
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_1/main/uc2_1_ClassPattern.java
@@ -0,0 +1,100 @@
+package egf.uc2_1.main;

+

+import org.eclipse.egf.common.helper.*;

+import java.util.*;

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

+import org.eclipse.egf.model.pattern.*;

+import org.eclipse.egf.pattern.execution.*;

+import org.eclipse.egf.pattern.query.*;

+

+public class uc2_1_ClassPattern 

+{

+  protected static String nl;

+  public static synchronized uc2_1_ClassPattern create(String lineSeparator)

+  {

+    nl = lineSeparator;

+    uc2_1_ClassPattern result = new uc2_1_ClassPattern();

+    nl = null;

+    return result;

+  }

+

+  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;

+  protected final String TEXT_1 = "* Class ";

+  protected final String TEXT_2 = ": ";

+  protected final String TEXT_3 = NL;

+  protected final String TEXT_4 = NL;

+

+	public uc2_1_ClassPattern()

+	{

+	//Here is the constructor
+StringBuffer stringBuffer = new StringBuffer();
+

+    // add initialisation of the pattern variables (declaration has been already done).

+    

+	}

+  	

+  	public String generate(Object argument) throws Exception

+  {

+    final StringBuffer stringBuffer = new StringBuffer();

+    

+    InternalPatternContext ctx = (InternalPatternContext)argument;

+Map<String, String> queryCtx = null;

+IQuery.ParameterDescription paramDesc = null;

+

+    

+List<Object> aClassList = null;

+//this pattern can only be called by another (i.e. it's not an entry point in execution)

+

+

+for (Object aClassParameter : aClassList ) {

+

+this.aClass = (org.eclipse.emf.ecore.EClass)aClassParameter;

+

+

+    orchestration(ctx);

+    

+}

+if (ctx.useReporter()){

+    ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);

+    ctx.clearBuffer();

+}

+    

+    stringBuffer.append(TEXT_3);

+    stringBuffer.append(TEXT_4);

+    return stringBuffer.toString();

+  }

+public String orchestration(PatternContext ctx) throws Exception  {

+InternalPatternContext ictx = (InternalPatternContext)ctx;

+int executionIndex = ictx.getExecutionBuffer().length();

+

+    

+method_body(ictx.getBuffer(), ictx);

+    

+String loop = ictx.getBuffer().toString();

+if (ictx.useReporter()){

+    ictx.getExecutionBuffer().append(ictx.getBuffer().substring(ictx.getExecutionCurrentIndex()));

+    ictx.setExecutionCurrentIndex(0);

+    Map<String, Object> parameterValues = new HashMap<String, Object>();

+    parameterValues.put("aClass", this.aClass);

+    String outputWithCallBack = ictx.getExecutionBuffer().substring(executionIndex);

+    ictx.getReporter().loopFinished(loop, outputWithCallBack, ictx, parameterValues);

+    ictx.clearBuffer();}

+return loop;

+} 

+

+protected org.eclipse.emf.ecore.EClass aClass = null;

+public void set_aClass(org.eclipse.emf.ecore.EClass object) {

+this.aClass = object;

+}

+public Map<String, Object> getParameters() {

+final Map<String, Object> parameters = new HashMap<String, Object>();

+parameters.put("aClass", this.aClass);

+return parameters; }

+

+    protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {

+

+    stringBuffer.append(TEXT_1);

+    stringBuffer.append(aClass.getName());

+    stringBuffer.append(TEXT_2);

+    }

+    }
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_1/substitution/single/uc2_1_AttributePatternSubstitution1.java b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_1/substitution/single/uc2_1_AttributePatternSubstitution1.java
new file mode 100644
index 0000000..f30bec8
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_1/substitution/single/uc2_1_AttributePatternSubstitution1.java
@@ -0,0 +1,101 @@
+package egf.uc2_1.substitution.single;

+

+import org.eclipse.egf.common.helper.*;

+import java.util.*;

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

+import org.eclipse.egf.model.pattern.*;

+import org.eclipse.egf.pattern.execution.*;

+import org.eclipse.egf.pattern.query.*;

+

+public class uc2_1_AttributePatternSubstitution1 

+{

+  protected static String nl;

+  public static synchronized uc2_1_AttributePatternSubstitution1 create(String lineSeparator)

+  {

+    nl = lineSeparator;

+    uc2_1_AttributePatternSubstitution1 result = new uc2_1_AttributePatternSubstitution1();

+    nl = null;

+    return result;

+  }

+

+  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;

+  protected final String TEXT_1 = "Sub1:";

+  protected final String TEXT_2 = "_attribute ";

+  protected final String TEXT_3 = NL;

+  protected final String TEXT_4 = NL;

+

+	public uc2_1_AttributePatternSubstitution1()

+	{

+	//Here is the constructor
+StringBuffer stringBuffer = new StringBuffer();
+

+    // add initialisation of the pattern variables (declaration has been already done).

+    

+	}

+  	

+  	public String generate(Object argument) throws Exception

+  {

+    final StringBuffer stringBuffer = new StringBuffer();

+    

+    InternalPatternContext ctx = (InternalPatternContext)argument;

+Map<String, String> queryCtx = null;

+IQuery.ParameterDescription paramDesc = null;

+

+    

+List<Object> anAttributeList = null;

+//this pattern can only be called by another (i.e. it's not an entry point in execution)

+

+

+for (Object anAttributeParameter : anAttributeList ) {

+

+this.anAttribute = (org.eclipse.emf.ecore.EAttribute)anAttributeParameter;

+

+

+    orchestration(ctx);

+    

+}

+if (ctx.useReporter()){

+    ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);

+    ctx.clearBuffer();

+}

+    

+    stringBuffer.append(TEXT_3);

+    stringBuffer.append(TEXT_4);

+    return stringBuffer.toString();

+  }

+public String orchestration(PatternContext ctx) throws Exception  {

+InternalPatternContext ictx = (InternalPatternContext)ctx;

+int executionIndex = ictx.getExecutionBuffer().length();

+

+    

+    

+method_body(ictx.getBuffer(), ictx);

+    

+String loop = ictx.getBuffer().toString();

+if (ictx.useReporter()){

+    ictx.getExecutionBuffer().append(ictx.getBuffer().substring(ictx.getExecutionCurrentIndex()));

+    ictx.setExecutionCurrentIndex(0);

+    Map<String, Object> parameterValues = new HashMap<String, Object>();

+    parameterValues.put("anAttribute", this.anAttribute);

+    String outputWithCallBack = ictx.getExecutionBuffer().substring(executionIndex);

+    ictx.getReporter().loopFinished(loop, outputWithCallBack, ictx, parameterValues);

+    ictx.clearBuffer();}

+return loop;

+} 

+

+protected org.eclipse.emf.ecore.EAttribute anAttribute = null;

+public void set_anAttribute(org.eclipse.emf.ecore.EAttribute object) {

+this.anAttribute = object;

+}

+public Map<String, Object> getParameters() {

+final Map<String, Object> parameters = new HashMap<String, Object>();

+parameters.put("anAttribute", this.anAttribute);

+return parameters; }

+

+    protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {

+

+    stringBuffer.append(TEXT_1);

+    stringBuffer.append(anAttribute.getName());

+    stringBuffer.append(TEXT_2);

+    }

+    }
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_2/substitution/merge/uc2_2_AttributePatternSubstitution2.java b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_2/substitution/merge/uc2_2_AttributePatternSubstitution2.java
new file mode 100644
index 0000000..cc90e9e
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_2/substitution/merge/uc2_2_AttributePatternSubstitution2.java
@@ -0,0 +1,98 @@
+package egf.uc2_2.substitution.merge;

+

+import org.eclipse.egf.common.helper.*;

+import java.util.*;

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

+import org.eclipse.egf.model.pattern.*;

+import org.eclipse.egf.pattern.execution.*;

+import org.eclipse.egf.pattern.query.*;

+

+public class uc2_2_AttributePatternSubstitution2 

+{

+  protected static String nl;

+  public static synchronized uc2_2_AttributePatternSubstitution2 create(String lineSeparator)

+  {

+    nl = lineSeparator;

+    uc2_2_AttributePatternSubstitution2 result = new uc2_2_AttributePatternSubstitution2();

+    nl = null;

+    return result;

+  }

+

+  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;

+  protected final String TEXT_1 = "+Sub2 ";

+  protected final String TEXT_2 = NL;

+  protected final String TEXT_3 = NL;

+

+	public uc2_2_AttributePatternSubstitution2()

+	{

+	//Here is the constructor
+StringBuffer stringBuffer = new StringBuffer();
+

+    // add initialisation of the pattern variables (declaration has been already done).

+    

+	}

+  	

+  	public String generate(Object argument) throws Exception

+  {

+    final StringBuffer stringBuffer = new StringBuffer();

+    

+    InternalPatternContext ctx = (InternalPatternContext)argument;

+Map<String, String> queryCtx = null;

+IQuery.ParameterDescription paramDesc = null;

+

+    

+List<Object> anAttributeList = null;

+//this pattern can only be called by another (i.e. it's not an entry point in execution)

+

+

+for (Object anAttributeParameter : anAttributeList ) {

+

+this.anAttribute = (org.eclipse.emf.ecore.EAttribute)anAttributeParameter;

+

+

+    orchestration(ctx);

+    

+}

+if (ctx.useReporter()){

+    ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);

+    ctx.clearBuffer();

+}

+    

+    stringBuffer.append(TEXT_2);

+    stringBuffer.append(TEXT_3);

+    return stringBuffer.toString();

+  }

+public String orchestration(PatternContext ctx) throws Exception  {

+InternalPatternContext ictx = (InternalPatternContext)ctx;

+int executionIndex = ictx.getExecutionBuffer().length();

+

+    

+    

+method_body(ictx.getBuffer(), ictx);

+    

+String loop = ictx.getBuffer().toString();

+if (ictx.useReporter()){

+    ictx.getExecutionBuffer().append(ictx.getBuffer().substring(ictx.getExecutionCurrentIndex()));

+    ictx.setExecutionCurrentIndex(0);

+    Map<String, Object> parameterValues = new HashMap<String, Object>();

+    parameterValues.put("anAttribute", this.anAttribute);

+    String outputWithCallBack = ictx.getExecutionBuffer().substring(executionIndex);

+    ictx.getReporter().loopFinished(loop, outputWithCallBack, ictx, parameterValues);

+    ictx.clearBuffer();}

+return loop;

+} 

+

+protected org.eclipse.emf.ecore.EAttribute anAttribute = null;

+public void set_anAttribute(org.eclipse.emf.ecore.EAttribute object) {

+this.anAttribute = object;

+}

+public Map<String, Object> getParameters() {

+final Map<String, Object> parameters = new HashMap<String, Object>();

+parameters.put("anAttribute", this.anAttribute);

+return parameters; }

+

+    protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {

+

+    stringBuffer.append(TEXT_1);

+    }

+    }
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_2/substitution/merge/uc2_2_ClassPatternSubstitution2.java b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_2/substitution/merge/uc2_2_ClassPatternSubstitution2.java
new file mode 100644
index 0000000..8551953
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/generated/egf/uc2_2/substitution/merge/uc2_2_ClassPatternSubstitution2.java
@@ -0,0 +1,101 @@
+package egf.uc2_2.substitution.merge;

+

+import org.eclipse.egf.common.helper.*;

+import java.util.*;

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

+import org.eclipse.egf.model.pattern.*;

+import org.eclipse.egf.pattern.execution.*;

+import org.eclipse.egf.pattern.query.*;

+

+public class uc2_2_ClassPatternSubstitution2 

+{

+  protected static String nl;

+  public static synchronized uc2_2_ClassPatternSubstitution2 create(String lineSeparator)

+  {

+    nl = lineSeparator;

+    uc2_2_ClassPatternSubstitution2 result = new uc2_2_ClassPatternSubstitution2();

+    nl = null;

+    return result;

+  }

+

+  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;

+  protected final String TEXT_1 = "*Sub2 Class ";

+  protected final String TEXT_2 = ": ";

+  protected final String TEXT_3 = NL;

+  protected final String TEXT_4 = NL;

+

+	public uc2_2_ClassPatternSubstitution2()

+	{

+	//Here is the constructor
+StringBuffer stringBuffer = new StringBuffer();
+

+    // add initialisation of the pattern variables (declaration has been already done).

+    

+	}

+  	

+  	public String generate(Object argument) throws Exception

+  {

+    final StringBuffer stringBuffer = new StringBuffer();

+    

+    InternalPatternContext ctx = (InternalPatternContext)argument;

+Map<String, String> queryCtx = null;

+IQuery.ParameterDescription paramDesc = null;

+

+    

+List<Object> aClassList = null;

+//this pattern can only be called by another (i.e. it's not an entry point in execution)

+

+

+for (Object aClassParameter : aClassList ) {

+

+this.aClass = (org.eclipse.emf.ecore.EClass)aClassParameter;

+

+

+    orchestration(ctx);

+    

+}

+if (ctx.useReporter()){

+    ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);

+    ctx.clearBuffer();

+}

+    

+    stringBuffer.append(TEXT_3);

+    stringBuffer.append(TEXT_4);

+    return stringBuffer.toString();

+  }

+public String orchestration(PatternContext ctx) throws Exception  {

+InternalPatternContext ictx = (InternalPatternContext)ctx;

+int executionIndex = ictx.getExecutionBuffer().length();

+

+    

+    

+method_body(ictx.getBuffer(), ictx);

+    

+String loop = ictx.getBuffer().toString();

+if (ictx.useReporter()){

+    ictx.getExecutionBuffer().append(ictx.getBuffer().substring(ictx.getExecutionCurrentIndex()));

+    ictx.setExecutionCurrentIndex(0);

+    Map<String, Object> parameterValues = new HashMap<String, Object>();

+    parameterValues.put("aClass", this.aClass);

+    String outputWithCallBack = ictx.getExecutionBuffer().substring(executionIndex);

+    ictx.getReporter().loopFinished(loop, outputWithCallBack, ictx, parameterValues);

+    ictx.clearBuffer();}

+return loop;

+} 

+

+protected org.eclipse.emf.ecore.EClass aClass = null;

+public void set_aClass(org.eclipse.emf.ecore.EClass object) {

+this.aClass = object;

+}

+public Map<String, Object> getParameters() {

+final Map<String, Object> parameters = new HashMap<String, Object>();

+parameters.put("aClass", this.aClass);

+return parameters; }

+

+    protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {

+

+    stringBuffer.append(TEXT_1);

+    stringBuffer.append(aClass.getName());

+    stringBuffer.append(TEXT_2);

+    }

+    }
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/plugin.properties b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/plugin.properties
new file mode 100644
index 0000000..0266156
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/plugin.properties
@@ -0,0 +1,13 @@
+##

+#  Copyright (c) 2009-2010 Thales Corporate Services S.A.S.

+#  All rights reserved. This program and the accompanying materials

+#  are made available under the terms of the Eclipse Public License v1.0

+#  which accompanies this distribution, and is available at

+#  http://www.eclipse.org/legal/epl-v10.html

+# 

+#  Contributors:

+#      Thales Corporate Services S.A.S - initial API and implementation

+##

+

+pluginName=EGF Usecase Pattern UC2 (Incubation)

+providerName=Eclipse Modeling Project

diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/plugin.xml b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/plugin.xml
new file mode 100644
index 0000000..57faefa
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/plugin.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<?eclipse version="3.0"?>

+<!--

+     Copyright (c) 2009-2010 Thales Corporate Services S.A.S.

+     All rights reserved. This program and the accompanying materials

+     are made available under the terms of the Eclipse Public License v1.0

+     which accompanies this distribution, and is available at

+     http://www.eclipse.org/legal/epl-v10.html

+    

+     Contributors:

+         Thales Corporate Services S.A.S - initial API and implementation

+ -->

+<plugin>

+

+   <extension

+         point="org.eclipse.egf.core.fcore">

+      <fcore

+            id="egf/Pattern_UC2_1_SinglePatternSubstitution.fcore">

+      </fcore>

+      <fcore

+            id="egf/Pattern_UC2_2_MergingPatternSubstitution.fcore">

+      </fcore>

+   </extension>

+

+</plugin>

diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtk1nxEd-yhOrMHI1JRQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtk1nxEd-yhOrMHI1JRQ.pt
new file mode 100644
index 0000000..e305c44
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtk1nxEd-yhOrMHI1JRQ.pt
@@ -0,0 +1 @@
+*Sub2 Class <%=aClass.getName()%>: 
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtkVnxEd-yhOrMHI1JRQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtkVnxEd-yhOrMHI1JRQ.pt
new file mode 100644
index 0000000..4268557
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtkVnxEd-yhOrMHI1JRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc2_2.substitution.merge" class="uc2_2_ClassPatternSubstitution2" imports="org.eclipse.egf.common.helper.* java.util.* org.eclipse.emf.ecore.* org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.*"  %>
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtklnxEd-yhOrMHI1JRQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtklnxEd-yhOrMHI1JRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtklnxEd-yhOrMHI1JRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtlFnxEd-yhOrMHI1JRQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtlFnxEd-yhOrMHI1JRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._6KKtkFnxEd-yhOrMHI1JRQ/method._6KKtlFnxEd-yhOrMHI1JRQ.pt
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYk1npEd-nCN8bxVd2Rg.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYk1npEd-nCN8bxVd2Rg.pt
new file mode 100644
index 0000000..79fbe3f
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYk1npEd-nCN8bxVd2Rg.pt
@@ -0,0 +1 @@
+Sub1:<%=anAttribute.getName()%>_attribute 
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYkVnpEd-nCN8bxVd2Rg.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYkVnpEd-nCN8bxVd2Rg.pt
new file mode 100644
index 0000000..a52d451
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYkVnpEd-nCN8bxVd2Rg.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc2_1.substitution.single" class="uc2_1_AttributePatternSubstitution1" imports="org.eclipse.egf.common.helper.* java.util.* org.eclipse.emf.ecore.* org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.*"  %>
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYklnpEd-nCN8bxVd2Rg.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYklnpEd-nCN8bxVd2Rg.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYklnpEd-nCN8bxVd2Rg.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYlFnpEd-nCN8bxVd2Rg.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYlFnpEd-nCN8bxVd2Rg.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._BhzYkFnpEd-nCN8bxVd2Rg/method._BhzYlFnpEd-nCN8bxVd2Rg.pt
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MI1ntEd-nCN8bxVd2Rg.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MI1ntEd-nCN8bxVd2Rg.pt
new file mode 100644
index 0000000..417eaf6
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MI1ntEd-nCN8bxVd2Rg.pt
@@ -0,0 +1 @@
++Sub2 
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MIVntEd-nCN8bxVd2Rg.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MIVntEd-nCN8bxVd2Rg.pt
new file mode 100644
index 0000000..2c881ab
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MIVntEd-nCN8bxVd2Rg.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc2_2.substitution.merge" class="uc2_2_AttributePatternSubstitution2" imports="org.eclipse.egf.common.helper.* java.util.* org.eclipse.emf.ecore.* org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.*"  %>
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MIlntEd-nCN8bxVd2Rg.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MIlntEd-nCN8bxVd2Rg.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MIlntEd-nCN8bxVd2Rg.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MJFntEd-nCN8bxVd2Rg.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MJFntEd-nCN8bxVd2Rg.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._ED6MIFntEd-nCN8bxVd2Rg/method._ED6MJFntEd-nCN8bxVd2Rg.pt
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXY1krEd-nZ9GSBuVMNQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXY1krEd-nZ9GSBuVMNQ.pt
new file mode 100644
index 0000000..d86deca
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXY1krEd-nZ9GSBuVMNQ.pt
@@ -0,0 +1 @@
+Main:<%=anAttribute.getName()%>_attribute 
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXYVkrEd-nZ9GSBuVMNQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXYVkrEd-nZ9GSBuVMNQ.pt
new file mode 100644
index 0000000..1ffbac7
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXYVkrEd-nZ9GSBuVMNQ.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc2_1.main" class="uc2_1_AttributePattern" imports="org.eclipse.egf.common.helper.* java.util.* org.eclipse.emf.ecore.* org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.*"  %>
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXYlkrEd-nZ9GSBuVMNQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXYlkrEd-nZ9GSBuVMNQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXYlkrEd-nZ9GSBuVMNQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXZFkrEd-nZ9GSBuVMNQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXZFkrEd-nZ9GSBuVMNQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._KAoXYFkrEd-nZ9GSBuVMNQ/method._KAoXZFkrEd-nZ9GSBuVMNQ.pt
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._aM8CUFn5Ed-yhOrMHI1JRQ/method._aM8CU1n5Ed-yhOrMHI1JRQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._aM8CUFn5Ed-yhOrMHI1JRQ/method._aM8CU1n5Ed-yhOrMHI1JRQ.pt
new file mode 100644
index 0000000..eba6406
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._aM8CUFn5Ed-yhOrMHI1JRQ/method._aM8CU1n5Ed-yhOrMHI1JRQ.pt
@@ -0,0 +1 @@
++Sub3 
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._aM8CUFn5Ed-yhOrMHI1JRQ/method._aM8CUVn5Ed-yhOrMHI1JRQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._aM8CUFn5Ed-yhOrMHI1JRQ/method._aM8CUVn5Ed-yhOrMHI1JRQ.pt
new file mode 100644
index 0000000..f39cce5
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._aM8CUFn5Ed-yhOrMHI1JRQ/method._aM8CUVn5Ed-yhOrMHI1JRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc2_3.substitution.level2" class="uc2_3_AttributePatternSubstitution3" imports="org.eclipse.egf.common.helper.* java.util.* org.eclipse.emf.ecore.* org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.*"  %>
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._aM8CUFn5Ed-yhOrMHI1JRQ/method._aM8CUln5Ed-yhOrMHI1JRQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._aM8CUFn5Ed-yhOrMHI1JRQ/method._aM8CUln5Ed-yhOrMHI1JRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._aM8CUFn5Ed-yhOrMHI1JRQ/method._aM8CUln5Ed-yhOrMHI1JRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._aM8CUFn5Ed-yhOrMHI1JRQ/method._aM8CVFn5Ed-yhOrMHI1JRQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._aM8CUFn5Ed-yhOrMHI1JRQ/method._aM8CVFn5Ed-yhOrMHI1JRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._aM8CUFn5Ed-yhOrMHI1JRQ/method._aM8CVFn5Ed-yhOrMHI1JRQ.pt
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._K_KHEFkpEd-nZ9GSBuVMNQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._K_KHEFkpEd-nZ9GSBuVMNQ.pt
new file mode 100644
index 0000000..6c9468e
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._K_KHEFkpEd-nZ9GSBuVMNQ.pt
@@ -0,0 +1,2 @@
+

+* Class <%=aClass.getName()%>: 

diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._OryJ0FkpEd-nZ9GSBuVMNQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._OryJ0FkpEd-nZ9GSBuVMNQ.pt
new file mode 100644
index 0000000..acf3c0c
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._OryJ0FkpEd-nZ9GSBuVMNQ.pt
@@ -0,0 +1 @@
+[Class End <%=aClass.getName()%>]
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2No1koEd-nZ9GSBuVMNQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2No1koEd-nZ9GSBuVMNQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2No1koEd-nZ9GSBuVMNQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2NoVkoEd-nZ9GSBuVMNQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2NoVkoEd-nZ9GSBuVMNQ.pt
new file mode 100644
index 0000000..fe1703b
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2NoVkoEd-nZ9GSBuVMNQ.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc2_1.main" class="uc2_1_ClassPattern" imports="org.eclipse.egf.common.helper.* java.util.* org.eclipse.emf.ecore.* org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.*"  %>
\ No newline at end of file
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2NolkoEd-nZ9GSBuVMNQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2NolkoEd-nZ9GSBuVMNQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2NolkoEd-nZ9GSBuVMNQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2NpFkoEd-nZ9GSBuVMNQ.pt b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2NpFkoEd-nZ9GSBuVMNQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.usecase.pattern.uc2/templates/pattern._gA2NoFkoEd-nZ9GSBuVMNQ/method._gA2NpFkoEd-nZ9GSBuVMNQ.pt